Associate
- Joined
- 30 Jul 2003
- Posts
- 442
ok so the web server went down, and after some arguements with the host we managed to retrieve the site. But now the admin logon does not work, ive identified a couple of problems where the username & pass for the sql server were wrong and have corrected those, but im now stuck
The problem appears to be with the user verification code (i didnt write it and im not that good at php)
i was wondering if anyone could have a glance and see if they can spot the problem?
at the moment im gettint the error result in the address abar, so im guessing it cant find the items requested in the sql query? any ideas?
The problem appears to be with the user verification code (i didnt write it and im not that good at php)
i was wondering if anyone could have a glance and see if they can spot the problem?
<?
session_start();
require("config.php");
require("connection.php");
session_register('a_name');
header("Location:index1.php");
$query = "SELECT * FROM ad_admin WHERE admin_name = ".$HTTP_POST_VARS['name']." AND admin_pass = ".$HTTP_POST_VARS['pass']."";
$result=mysql_query($query);
$num=mysql_num_rows($result);
$nu=$num;
if ($nu==0)
{
header("Location:index.php?msg=error$result");
}
else
{
$row = mysql_fetch_array($result, MYSQL_NUM);
session_register('a_name');
$a_name=$row[1];
header("Location:index1.php");
}
?>
at the moment im gettint the error result in the address abar, so im guessing it cant find the items requested in the sql query? any ideas?