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

Table control is disappearing from Screen
Hi Experts,

I have a screen with multiple table control(TC). Each table control has two c

Undefined index: username HELP NEWBIE
I am trying a simple login/logout for my website. It works well with checking if the username exists

isset undefined variable
Hi all,

Hope someone can point out the obvious. I've a log in script, if you dont enter a use

form problem
Hi all, I think this is going to be easy to resolve but for I have been looking at it to long and I

SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here i

Getting number of affected rows in SQLPLUS..
Hi everyone,
I have a shell script where i am invoking sqlplus, running a query and saving t

To add a field on the screen XK02.
Hi All,

How to add an additional field in the vendor change control screen XK02.
The

Update Myspace status with CURL
Logging in:

Code: <?php

class Myspace
{
function login($username, $pa

PHP submit form script causing blank page
Im trying to submit a form using this script, however nothing shows up on the page, does anyone know

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

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