session variables not being passed
Posted: Sun Jan 18, 2004 11:48 am
Whenever i start a session, the variables i registered are not being passed on to other pages. I made a quick application to test this, and it didnt work. Here is the code for it
sessionTest.php
and for sessionTest2.php:
This does not work for some reason. to see the output go to
http://69.138.180.98/AOD/test/sessionTest.php
Thanks in advance
sessionTest.php
Code: Select all
<?php
session_start();
session_register('session_var');
?>
<html>
<head><title>Test</title></head>
<body>
<?php
$session_var = "testing";
echo "<form action = 'sessionTest2.php' method = 'post'>
<input type = 'text' name = 'form_var' value 'testing'>
<input type = 'submit' value = 'go'>
</form>";
?>
</body>
</html>Code: Select all
<?php
session_start();
?>
<html>
<head><title>Test</title></head>
<body>
<?php
echo "session_var = $session_var<br>\n";
echo "form_var = $form_var<br>\n";
?>
</body>
</html>http://69.138.180.98/AOD/test/sessionTest.php
Thanks in advance