hi every one
i will write the code of login but when i up this code on my web sit i have the problem that say
Fatal error: Call to undefined function IsValidUser() in /home/kamiti/public_html/LogiInto/Login.php on line 13
but i will write this function on DataAccess.php page
<?
if ( phpversion() >= "4.2.0"){
extract($_POST);
extract($_GET);
extract($_SERVER);
extract($_COOKIE);
}
error_reporting(0);
$hostId="localhost";
$dbUser="root";
$dbPassword="123123";
$dbName="kamitidb";
mysql_pconnect($hostId,$dbUser,$dbPassword) or die ("íÊã ÊÍíË ÞÇÚÏÉ ÇáÈíÇäÇÊ");
mysql_select_db($dbName) or die ("áÇ ÊæÌÏ ÞÇÚÏÉ ÈíÇäÇÊ");
function IsValidUser($Account,$Password){
$query="select * from accounts where Account='".
$Account."'";// sure binary search will happen
$result=mysql_query($query);
$i=mysql_num_rows($result);
if($i>0){
$row=mysql_fetch_array($result);
if($row["Password"]==$Password){//case sensitive compare
return true; // correct acccount and password
}
else
return false;// correct account with false password
}
else
return false;// invalid account and password
}
function GetAccountType($account){
$query="select usertypes.type from accounts,usertypes
where typeid=usertypes.id and account='$account'";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
return $row["type"];
}
?>
can any one help me