-1
我獲得以下錯誤:警告:mysql_fetch_array
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in......
這裏是我的查詢:
$result = mysql_query("SELECT * FROM users WHERE username = $user' AND password = '$pass'");
while($row = mysql_fetch_array($result))
{
$expire = time()+60*60*24*30;
setcookie("id", $row['id'], $expire);
echo "Logged in. as <b>.".$row['username']."</b>";
}