Re: problem with login script

From: Date: Thu, 13 Jun 2002 19:23:51 +0000
Subject: Re: problem with login script
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-19791@lists.php.net to get a copy of this message
hi adding the <? ?>in func.php still returns this. my functions script is -----------------------------------------------------------------function auuser($login,$passwd) { global $db_server,$http_host,$db,$db_user,$db_pass,$doc_root; if(!( $connect=pg_pconnect("host=$db_server dbname=$db user=$db_user password=$db_pass")) { 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; } ------------------------------------- my login.php file is <?include 'functions.php'; $user=$_POST['login']; $passwd=$_POST['passwd']; $result=auuser($user,$passwd); if(!$result) { setcookie("cookie_passwd",$passwd); setcookie("cookie_user",$user); . . } ---------------------- when i run these i get this error Parse error: parse error, unexpected ';' in /usr/local/apache/htdocs/sims/php/functions.php on line 12 Fatal error: Call to undefined function: auuser() in /usr/local/apache/htdocs/sims/php/login1.php on line 8 what is the prob suman

« previous php.db (#19791) next »