Any help or hints much appreciated.
Thanks
Jay
Code: Select all
<?php
$status = authenticate($f_user,$f_pass);
if ($status == 1)
{
session_start();
session_register("SESSION");
session_register("SESSION_UNAME");
$SESSION_UNAME = $f_user;
header("Location: admin.php");
exit();
}
else
{
header("Location: error.php?e=$status");
exit();
}
function authenticate($fuser,$fpass)
{
include ("secure/valdata.dac");
If (mysql_num_rows($result) == 1)
{
if (strcmp(mysql_result($result,0,pass),$fpass) == 0 )
{
return 1;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
?>?>