OK. I have all this working on my machine but when I load it up to the clients server it does not work. Please help it is very basic
//this is called by login.php a basic login page
<?PHP
session_start();
$_PASSWORD = "a";
$_LOGIN = "a";
if($_POST['login'] == $_LOGIN && $_POST['password'] == $_PASSWORD)
{
//start the session and register a variable
$valid = $_POST['login'];
session_register("valid");
//we will redirect the user to another page where we will make sure theyre logged in
header( "Location: page1.php" );
}
else
{
header("Location: login.php?error=invalid");
}
?>
/////////////////////////////////////////////////////////////
//page1.php
<?
session_start();
if(session_is_registered("valid"))
echo welcome;
else
header("Location: login.php?error=page1");
?>
The problem on the clients server is that the function
session_is_registered("valid") always returns false.
This works on my machine can someome please help as I have not been here for 6 hours and I am going nuts.
Thank you
David