重複の可能性:
mysql_fetch_array() は、パラメーター 1 がリソースであると想定しており、select でブール値が指定されています
//define variable to check the number of rows where the sql query is true to find out if the username or password are already in use
$EmailCheck = mysql_query("SELECT `Email` FROM `Customer` WHERE `Email` = '$RegCusEmail'");
$UserCheck = mysql_query("SELECT `Username` FROM `Customer` WHERE `Username` = '$RegCusUser'");
//checks if emails in use
if (mysql_num_rows($EmailCheck) != 0)
{
echo '<p id="error">The Email address you have entered is already in use.<p>';
}
//checks if username is in use
elseif (mysql_num_rows($UserCheck) != 0)
{
echo '<p id="error">The username you have entered is already in use.<p>';
}
上記のコードは、登録者の電子メールとユーザー名をデータベースで検索することになっています。それらが既に存在する場合は、ユーザーに別のものを使用するように指示しますが、それを使用するとこのエラーが発生しますか?
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in (file directory) on line 56 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in (file directory) on line 62