Hi Php Builders,
I am having problems with my Login script. It works fine on most computers, but I am having issues with a couple computer running Windows 98. Does anybody have any advice about this?
This is the script for the Login screen:
$result_users = mysql_query ("SELECT * FROM users ORDER BY surname ASC") or die ("Database error #1");
$row_users = mysql_fetch_array($result_users);
// verify user identity
if ($enter) {
$result = mysql_query("SELECT * FROM users WHERE surname='$user' AND password='$password' ");
if ((mysql_num_rows($result))>0) {
global $valid_user;
$valid_user=$user;
session_start();
session_register("valid_user");
header("Location: main.php");
}
}
?>
Typically, this works just fine, but some people can't get sessions to start for them. If it matters, this is the script that is on the pages once a person makes it inside.
// session control
session_start();
if (session_is_registered("valid_user"))
{ } else {
header ( "Location: index.php");
exit;
}
Why might it work on some computers and some not?
Thank you for any help, T.