Stumped: vars not passed!!!
| From: | Petre Agenbag | Date: | Thu, 15 Aug 2002 07:22:25 +0000 |
| Subject: | Stumped: vars not passed!!! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112708@lists.php.net to get a copy of this message | ||
I'm going mad.
I've been trying to implement sessions so it will work backward on my
older 4.0.3 server ( I'm working on a 4.1.2), with no success as of yet,
but I think it's my 4.1.2 that's causing this, as the app in the
following example works perfectly on the older one.
Note, I have explicitly used the manual URl method to pass variables and
NOT the $HTTP_POST_VARS['x'] method as I am suspecting that my
register_globals is not working.
PS, register_globals, track vars etc IS on on both systems.
Look at this:
index.php
<form action="page1.php" method="POST"
enctype="multipart/form-data">
<input type="text" name="username"><br>
<input type="text" name="password"><br>
<input type="submit" name="submit">
</form>
page1.php
<a
href="page2.php?username=<?=$username?>&password=<?=$password?>">Next</a>
page2.php
<form action="page3.php" method="POST"
enctype="multipart/form-data">
<input type="text" name="test">
<input type="hidden" name="username"
value="<?=$username?>">
<input type="hidden" name="password"
value="<?=$password?>">
<input type="submit" name="submit">
</form>
page3.php
Username: <?=$username?> <br>
Password: <?=$password?> <br>
Test: <?=$test?> <br>
This DOES NOT work on my 4.1.2 system.
Why?
I know page2 is not needed, but it is still supposed to work right? I
deliberatly put it there to "extend" the path the variable needs to
piggy back to see where I lose them, but on my system it loses the vars
right at the second page already!!!!