この行である23行目でエラーが発生しています:
if (mysql_num_rows($result) > 0) {
以下の私のコードを見て、私が見逃したものを見ることができますか?
<?php
// Include database connection and select database UFPProducts
include "../shopdb/connection.php";
?>
<?php
//
session_start();
// (2) Collect data from form and save in variables
$username=$_POST['username'];
$password=$_POST['password'];
// (3) Create query of the form below to search the user table
// "SELECT * FROM Users WHERE UserName='$username' AND Password='$password'"
"SELECT * FROM USERS where Username='$username' AND Password='$password'"
// (3) Run query through connection
// (4) Check result of query using code below
// if rows found set authenticated user to the user name entered
if (mysql_num_rows($result) > 0) {
$_SESSION["authenticatedUser"] = $username;
// Relocate to the logged-in page
header("Location: loggedon.php");
}
else
// login failed redirect back to login page with error message
{
$_SESSION["message"] = "Could not connect as $username " ;
header("Location: login.php");
}
?>
お時間とご協力ありがとうございました