parse error in line??
| From: | Webby | Date: | Wed, 29 May 2002 11:17:44 +0000 |
| Subject: | parse error in line?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99680@lists.php.net to get a copy of this message | ||
<?
require 'common.php';
function DisplayErrMsg($message)
{
printf
("<blockquote><blockquote><blockquote><h3><fontcolor=\"#cc0000\">
%s</font></h3></blockquote></blockquote></blockqoute>\n",$message);
}
function authenticateUser($user, $password)
{
global $host, $httphost, $user_db, $password_db, $db, $docroot;
if (! ($link = mysql_pconnect($host, $user_db, $password_db)))
{
DisplayErrMsg(sprintf("internal Error %d: %s \n",
mysql_errno(), mysql_error() ));
DisplayErrMsg(sprintf("internal Error %s %s %s %d: %s \n",
$host, $user, $password, mysql_errno(), mysql_error() ));
return 0;
}
if (! ($result = mysql_db_query("$db","select * from user_login
where userid = '$user'")))
{
DisplayErrMsg(sprintf("internal Error %d: %s \n",
mysql_errno(), mysql_error() ));
return 0 ;
}
**/ when i run this script it's say parse error in this line 'i don't what
is wrong with this line
if (($row = mysql_fetch_array($result)) &&
($password==$row["password"] && $password ! = ""))
return 1;
else
return 0;
}
function deleteCookies()
{
for ($i=0; $i<$total_items; $i++)
{
setcookie("items_tray[$i]","");
setcookie("quantity[$i]","");
}
setcookie("items_tray","");
setcookie("total_items","");
setcookie("quantity","");
}
?>