This is a discussion on post don't retrieve the var. within the alt.comp.lang.php forums, part of the PHP Programming Forums category; I've this URL http://192.168.1.2/EditUser.php?User...ageProfile.php And EditUser.php code: $editFormAction = $HTTP_SERVER_VARS['...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I've this URL
http://192.168.1.2/EditUser.php?User...ageProfile.php And EditUser.php code: $editFormAction = $HTTP_SERVER_VARS['PHP_SELF']; if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { $editFormAction .= "?" . $HTTP_SERVER_VARS['QUERY_STRING']; } if (isset($HTTP_GET_VARS['UserID'])) { $id = $HTTP_GET_VARS['UserID']; if ($id > 0){ ... } } if (isset($HTTP_GET_VARS['PrevPage'])) { $VPrevPage = $HTTP_GET_VARS['PrevPage']; } else { $VPrevPage = "default.php"; } .... echo ("PrevPage: ".$VPrevPage); WHY THE HELL $PrevPage is always default.php ???? |
|
|||
|
"Bob Bedford" a écrit le 11/12/2003 :
> I've this URL > > http://192.168.1.2/EditUser.php?User...ageProfile.php your separator is maybe not ; but & [...] > > WHY THE HELL $PrevPage is always default.php ???? -- Have you read the manual ? http://www.php.net/manual/en/ |
|
|||
|
"Bob Bedford" <bedford1@YouKnowWhatToDohotmail.com> wrote in message
news:3fd8f095$0$783$5402220f@news.sunrise.ch... > I've this URL > > http://192.168.1.2/EditUser.php?User...ageProfile.php > > And EditUser.php code: > $editFormAction = $HTTP_SERVER_VARS['PHP_SELF']; > if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { > $editFormAction .= "?" . $HTTP_SERVER_VARS['QUERY_STRING']; > } > if (isset($HTTP_GET_VARS['UserID'])) { > $id = $HTTP_GET_VARS['UserID']; > if ($id > 0){ > ... > } > } > if (isset($HTTP_GET_VARS['PrevPage'])) { > $VPrevPage = $HTTP_GET_VARS['PrevPage']; > } > else > { > $VPrevPage = "default.php"; > } > ... > echo ("PrevPage: ".$VPrevPage); > > WHY THE HELL $PrevPage is always default.php ???? > hi Bob because Your HTTP Get syntax is wrong . . .you are not sending a legal 'Get' the second argument should be separated by & not ; Try http://192.168.1.2/EditUser.php?User...ageProfile.php If you code the line to be spat out of PHP you should really use & rather than just & , but you can get away with it on most browsers. Ron |
|
|||
|
"Lars Raube" <raube@rzr.de> wrote in message news:brbrer$e7f$01$1@news.t-online.com... > > > if (isset($HTTP_GET_VARS['PrevPage'])) { > > And why not using $_GET['PrevPage'] ? Itīs much shorter =) > But totally useless when running PHP versions lower then 4.1 JW |
|
|||
|
On 2003-12-12, Janwillem Borleffs <jw@jwscripts.com> wrote:
> > "Lars Raube" <raube@rzr.de> wrote in message > news:brbrer$e7f$01$1@news.t-online.com... >> > > if (isset($HTTP_GET_VARS['PrevPage'])) { >> >> And why not using $_GET['PrevPage'] ? Itīs much shorter =) >> > > But totally useless when running PHP versions lower then 4.1 One can always build the predefined arrays himself in the beginning of a script... -- verum ipsum factum |