-2
這裏是我的代碼的一部分。php fetch_assoc期望參數1是資源
if(isset($_GET['processit'])) {
if($_GET['processit']=='validation') {
$validcode = $_GET['acode'];
//get all the data.
$validquery = mysql_query("sleect * from tempuserinfo where activation_code ='$validcode'", $db);
//put into row
$rowxx = mysql_fetch_assoc($validquery);
$user_firstname = $rowxx['user_firstname'];
$user_middlename = $rowxx['user_middlename'];
$user_lastname = $rowxx['user_lastname'];
echo $user_firstname;
echo $user_middlename;
}
}
?>
而在我的桌子上它只有一行。但我有 警告:mysql_fetch_assoc()期望參數1是資源,布爾在381行中給出/home/u778649338/public_html/reservation/reservationkitchen.php
錯誤。我不知道什麼是錯的?
在此先感謝。