post don't retrieve the var.

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['...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-11-2003
Bob Bedford
 
Posts: n/a
Default post don't retrieve the var.

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 ????


Reply With Quote
  #2 (permalink)  
Old 12-11-2003
Jedi121
 
Posts: n/a
Default Re: post don't retrieve the var.

"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/

Reply With Quote
  #3 (permalink)  
Old 12-11-2003
Ron
 
Posts: n/a
Default Re: post don't retrieve the var.

"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 &amp;
rather than just & , but you can get away with it on most browsers.

Ron


Reply With Quote
  #4 (permalink)  
Old 12-12-2003
Lars Raube
 
Posts: n/a
Default Re: post don't retrieve the var.

> > if (isset($HTTP_GET_VARS['PrevPage'])) {

And why not using $_GET['PrevPage'] ? Itīs much shorter =)

greetings

Lars


Reply With Quote
  #5 (permalink)  
Old 12-12-2003
Janwillem Borleffs
 
Posts: n/a
Default Re: post don't retrieve the var.


"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



Reply With Quote
  #6 (permalink)  
Old 12-12-2003
Tim Van Wassenhove
 
Posts: n/a
Default Re: post don't retrieve the var.

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
Reply With Quote
  #7 (permalink)  
Old 12-12-2003
Janwillem Borleffs
 
Posts: n/a
Default Re: post don't retrieve the var.


"Tim Van Wassenhove" <euki@pi.be> schreef in bericht
news:brch75$1s8qq$2@ID-188825.news.uni-berlin.de...
>
> One can always build the predefined arrays himself in the beginning of a
> script...
>


Which is very inefficient

JW



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:06 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0