I am confused. I think I am doing this correctly.
I cannot retrieve the value of SESSION_CLIENT on the redirected page.
THis is the code that is received a form field called $form_client_id.
If the directory with the name for the form field does not exist, then it returns to the form page.
<?
if ($dir=opendir($form_client_id))
{
// initiate a session
session_start();
$SESSION_CLIENT = $form_client_id;
session_register("SESSION_CLIENT");
session_write_close();
// redirect to protected page
header("Location: $form_client_id/index.php4");
exit();
}
else
{
// if client dir fails, go to login page
header("Location: client_login.php4");
exit();
}
?>
The above works fine.
the next page
has this code:
<?php
echo "Client is ".$_SESSION['SESSION_CLIENT']."<br>";
?>
This does not work. Nothing gets displayed.
Any ideas? HELP! I need this fast