users access to certain pages/directories. The problem is that when
the login button is pushed (or the enter key pressed) the login screen
redraws, never loading the next page. I don't get any error messages.
I am using FreeBSD-5.1/Apache-2.0.46/MySQL-4.1.0.1/PHP-4.4.3.4
Thanks,
Chip
I have pasted the code below -
This is at the top of the page login.php -
-------------
<?
session_start();
session_register("userid","password");
if ($submit)
{
$db=mysql_connect("localhost","user","") or die ("Error in this query
$sql<< : " .mysql_error());
mysql_select_db("simradusa",$db) or die ("Error in this query >>$sql<<
: " .mysql_error());
$result=mysql_query("select * from user where userid = '$userid'",$db)
or die ("Error in this query >>$sql<< : " .mysql_error());
while ($row=mysql_fetch_array($result))
{
if ($row["userpassword"]==$password)
{
header('Location:
http://xxx.xxx.xxx.xx/auth_dealers/dealers_page.php');
}
}
}
?>
------------
This is at the top of all pages, before any html tags -
-------------
<?
session_start();
if(!isset($userid)) {
header('Location: http://xxx.xxx.xxx.xx/auth_dealers/login2.php');
exit;
}
?>