ok peeps. I'm really confused.
Had a piece of semi working php app, logon worked and such like when using localhost, however accessing remotely it "lost" or forgot the session stuff, I was informed that this is a php age issue ( was using4) so I upgraded to 4.3.0 ( I think) now my logon doesn't pass variables ( or the next form doesn't pick them up).
Logon page ( user enters user name and pass here)
<?
include("header.php");
?>
<html>
<body bgcolor="#000080" text="#ffffff">
<h1><center><u> Welcome </u></center></h1>
<p> To proceed with login please enter your user name and password and click the login button. If you are unsure of you username and password then please ask your teacher.</p>
<form method="GET" name="login" action="login.php">
Username:
<input type=text name="user"><br>
Password:
<input type=password name="pass"><ce>
<input type=submit value="Log In">
</form>
</html>
Login ( checks if the user exists)
<?
include("header.php");
include("config.php");
?>
<html>
<body bgcolor="#000080" text="#ffffff">
<?
$logres=@mysql_num_rows(mysql_query("select * from pupils where name='$user' AND password='$pass'"));
print("$user, $pass");
if($logres>0)
{
print ("login correct<br>");
if($user=='admin')
{
print ("Please click <A href=admin.htm> here </a> to continue");
}
Else
{
print ("Please click <A href=index.htm> here </a> to continue");
}
session_register("user");
}
else
{
print ("incorrect logon<br>");
print ("Please click <A href=logon.php> here </a> to re-try");
}
?>
</html>
Help me! please
John