Guest_imported
New member
- Jan 1, 1970
- 0
I'm trying to do a simple session in PHP (running Apache and PHP4Win build under Windows 2000). I cannot get my session to work. Is there anything special that is needed under Apache or PHP config to get sessions working. I have session support enabled in PHP and confirmed it with phpinfo().
Here's what I'm trying:
File 1:
<?
session_start();
$auth=true;
session_register('auth');
?>
<p>Click <a href="<link to file 2>">here</a> to proceed.
File 2:
if (session_is_registered('auth')) {
echo "<p>You have been authenticated. You can view this page.";
} else {
echo "<p>You have not logged in. Auth=$auth Click <a href=login.html>here</a> to do so.";
}
Thanks for any help.
Here's what I'm trying:
File 1:
<?
session_start();
$auth=true;
session_register('auth');
?>
<p>Click <a href="<link to file 2>">here</a> to proceed.
File 2:
if (session_is_registered('auth')) {
echo "<p>You have been authenticated. You can view this page.";
} else {
echo "<p>You have not logged in. Auth=$auth Click <a href=login.html>here</a> to do so.";
}
Thanks for any help.