<?
include("header.php");
include("config.php");
print ("$logres");
$logres=@mysql_num_rows(mysql_query("select * from pupils where name=$user AND password=$pass"));
if($logres<=0)
{
print ("login correct");
print ("Please click <A href=index.htm> here </a> to continue");
print("$logres");
session_register("user");
}
else
{
print ("incorrect logon");
print ("Please click <A href=testlogon.php> here </a> to re-try");
}
Right above code is meant to check logins, ( it always lets people in, it shouldn't) Are there any obvious balls ups?
Also, sometimes, later ( in the site) the user will be wrong a previous user will be used, any way I can get a session to die when a page is loaded? (when the user hits back often enough yuo get another users info, even if they log in ( works fine if window is closed)
Thanks
John