Me again

Still having problems with forms not sending variables, and session
variables dissapearing.

I have 2 systems, one older 4.0.3 PHP which is my main webserver, so all
scripts must comply with it...
And the other my development server with the latest 4.1.2

So, I'm trying to write scripts that will happily work on both, and I
understand that I must use HTTP_POST_VARS and HTTP_SESSION_VARS in order
to comply with 4.0.3.

register_globals and track_vars as well as trans_sid are enabled on

Now, take a look at the example below:

<form action="page2.php" method="POST" >
  <input type="text" name="test"><input type="submit" name="submit">


echo ' HTTP_POST_VARS :'.$HTTP_POST_VARS["test"].'<br>';
echo ' POST_VARS: '.$_POST["test"].'<br>';
echo ' normal test :'.$test.'<br>';
echo 'Session Value (only for

if ($HTTP_POST_VARS["test"]) {
$HTTP_SESSION_VARS["testing"] = $HTTP_POST_VARS["test"];
echo '<a href="page3.php">Click</a>';


echo 'Session Variable:'.$HTTP_SESSION_VARS["testing"].'<br>';
echo '<a href="page4.php">Forward to test sess var further</a><br>';
echo '<a href="page2.php">Back to test sess var</a><br>';


echo 'Session Variable:'.$HTTP_SESSION_VARS["testing"].'<br>';
echo '<a href="page3.php">Back to page 3 to test sess var
echo '<a href="page2.php">Back to page 2 to test sess var</a><br>';

This small test works 100% on my newer system, and I was under the
impression that I coded it to be backwards compatible with my older
system, BUT, 

look here: http://www.linuxhelp.co.za/session_test to see what it does
on my working server. The scripts are identical.

Please can you point out my mistakes in reasoning?

Also, I want these scripts to work regardless of cookies, so if you see
something that might cause problems when ppl disable cookies, plz

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to