Losing 'page' data


Posted on 16th Feb 2014 07:03 pm by admin

I have this code that allows me to update my database. But after updating, I lose the $_GET['page'] value in the browser. I need this value because it is passed when I go to other pages on the site.

Code: echo ($_GET['change'] == 'Garage_Type') ?
'<form method="get" action="' . $_SERVER['PHP_SELF'] .
'">
<select name="Garage_Type">
<option value="Attached">Garage </option>
<option value="Detached">Detached Garage </option>
<option value="Attached Carport">Carport </option>
<option value="Detached Carport">Detached Carport </option>
<option value="None">None </option>
</select>

<input type="submit" name="submit" value="Update DB!" /><input type="hidden" name="id" value="' . $this->_ID . '" /><input type="hidden" name="col" value="Garage_Type" /></form>' . '</td></tr></table></td></tr><tr><td colspan="3" bgcolor="#CCCCCC"></td></tr><tr><td>':
$this->_DATA['Garage_Type'] . '</td></tr></table> </td><td><a href="' . $_SERVER['PHP_SELF'] . '?change=Garage_Type&id=' .$this->_ID .'&page='.$_GET['page'].'&orderid='.$_GET['orderid'].'&asc='.$_GET['asc'].'">Edit</a>' .
'</td></tr><tr><td colspan="3" bgcolor="#CCCCCC">';

No comments posted yet

Your Answer:

Login to answer
138 Like 39 Dislike
Previous forums Next forums
Other forums

simplexml and xpath - Need some help
Hello,

I am trying to parse an xml which comes back from Amazon and I am trying to know how m

How to read CSS message data
Hi,
I have a requirement here. When working as a Dev angel for multiple customers its really di

button help
i originally had this but realised it is much easier to have a button.

Code: <?php

Strange cookie problem. setcookie dependant on where user was directed from?
Hello,

I have a website that sets a cookie when a user visits the website. The cookie holds a

simplexml_load_file and rss problem
Hi,

I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

very easy question about SQL info
Hello,
I think that I have a very easy question.
I know how to create a form using php SQL and

GIS appliction help
I found some tutorials in the internet to develop a map application I don't want to use google maps

asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash