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'] .
Did you know?Explore Trending and Topic pages for more stories like this.
'">
<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

Reg Ex
Im trying to search for the string: srv_9 (Dead ???)

I thought to use preg_match, however I d

session variable problem
Session variable is not working in Fire fox i am getting null value but it is working fine in IE.

LSB (PHP 5.3) problem with static value!
hello,

i'm having a problem. static::$text variable gets lost at some point. can someone plea

PHP Error
On my .php page I have a drop down box that has several names in it. When a user clicks the name &am

Selecting an "empty" date formated field
How do you select an "empty" date field? I've tried the few ways I can think.
SQL> select

Something like an INI editor or a DelimitedText-Editor
Hi all,

Am very, very, very new to PHP and not sure if I should be posting this to a Javascri

SAP Treasury - Commodities
We are running SAP ECC 6.0 with Treasury Activated.
EA-FIN is also activated (SFW5).

Help with translating C code into assembler code
Hi im doing a project that moves a robot around a maze avoiding walls and need some help with conver

FlashVar function how to insert variables
Hi guys. Im new in this forum and also new in php programming. Can you help me about this code?
<

If a form submits back to same page do you need to use $get
IM trying to pass page number and year that was selected back to the same page.

i have this c

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