Hi
I am a PHP newbie from a Java/C/Oracle background. I
cannot seem to get session management with PHP
working.
<?php
#echo 1;
$old = ini_set('session.use_cookies', 0);
session_start();
$username = $_REQUEST["username"];
session_register($username);
echo "old=".$old;
echo $username;
include_once("db_security.inc");
echo "PHPSESSID=".$PHPSESSID."\n";
$Postfrom = $_REQUEST["username"];
$Postpass = $_REQUEST["password"];
if (__user_authenticate($Postfrom,$Postpass))
{
$display = '>>Welcome '.$Postfrom.' !';
echo '<a href="ht_next.php">Next</a>';
echo $display;
} else {
echo "Login Failed!";
}
?>
In ht_next.php I have:
<?php
session_start();
echo $username;
?>
$username seems to be empty at this point.
echo "PHPSESSID=".$PHPSESSID."\n";
in the first script does not produce any output
either.
Any help would be appreciated.
Herman
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php