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

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does

Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:
Code: [General]
Online=0
I wou

Populate drop down list from table??
Lets say for arguments sake that i have a table which contains the numbers 1 to 10.
How can i get

Insert data in Mysql and move to another page
I'm stuck with this simple problem. I need to insert data in Mysql and then hit submit and move to a

how to get sn motherboard
Hello.
I want to get serial number motherboard, cpu and else hardware.
Can You show me sam

cURL Upload Help
OK, I am creating a bridge from a local program to my website and I am trying to find the best way t

Calculus Help (and by help I mean homework)
Hrmmm, I hate posting about math homework, partly because it's homework, and partly because I hate w

newbie question about multiple queries
hi everyone,
I'm sorry to ask such a basic question, but I'm young and trying to learn php on my

Help with Contact Form
I have this Form on an html page and the associated code on page.php (below).
I keep getting the

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