problem with login script

From: Date: Wed, 12 Jun 2002 22:00:45 +0000
Subject: problem with login script
Groups: php.db 
Request: Send a blank email to php-db+get-19769@lists.php.net to get a copy of this message
hi when i execute this script i an error -----------------------------------------------------------------------function this func is in file functions.php and the func deletecookies(); auuser($login,$passwd) { global $db_server,$http_host,$db,$db_user,$db_pass,$doc_root; $connect=pg_pconnect("host=$db_server dbname=$db user=$db_user password=$db_pass"); if(!$connect) { Displayerrmsg(sprintf("internal error %s\n",pg_ErrorMessage($connect)); return 0; } $query="select passwd from login where usr='$login'"; $result=pg_exec($connect,$query) or die("ERROR IN QUERY:$query".pg_last_error($connect) ); if (!$result) { Displayerrmsg(sprintf("internal error %s\n",pg_ErrorMessage($connect)); return 0; } if( ($arr=pg_fetch_array($result,0,PGSQL_BOTH)) && ($passwd==$arr["passwd"] && $passwd!="") ) return 1; else return 0; } -------------------- this is the file login.php <? require 'functions.php'; //deletecookies(); $user=$_POST['login']; $passwd=$_POST['passwd']; $result=auuser($user,$passwd); if(!$result) { setcookie("cookie_passwd",$passwd); setcookie("cookie_user",$user); header("Location :http://$http_host/$doc_root/stuinfo.html"); exit(); } else { header("Location:http://$http_host/$doc_root/login.html"); exit(); } --------------------------------------- i get this error function auuser($login,$passwd) { global $db_server,$http_host,$db,$db_user,$db_pass,$doc_root; return 0; } if( ($arr=pg_fetch_array($result,0,PGSQL_BOTH)) && ($passwd==$arr["passwd"] && $passwd!="") ) return 1; else return 0; } function Dispalyerrmsg ( $message ) { printf(" . . . the same func . %s \n",$message); } function deletecookies() { setcookie("cookie_user",""); } Fatal error: Call to undefined function: auuser() in /usr/local/apache/htdocs/sims/php/login1.php on line 35 plz help me.soprry for ong mail bye suman

« previous php.db (#19769) next »