我正在为我的注册码制作收据,但我不断收到此错误:
mysql_fetch_array() 期望参数 1 是资源,布尔值在
<?php
// (2)gather details of CustomerID sent
$customerId = $_GET['CustomerID'] ;
// (3)create query
$query = "SELECT * FROM Customer WHERE CustomerID = $customerId";
// (4) Run the query on the customer table through the connection
$result = mysql_query ($query);
// (5) print message with ID of inserted record
if ($row = mysql_fetch_array($result))
{
print "The following Customer was added";
print "<br>Customer ID: " . $row["CustomerID"];
print "<br>First Name: " . $row["Firstnames"];
print "<br>Surname: " . $row["Surname"];
print "<br>User Name: " . $row["Username"];
print "<br>Email: " . $row["Email"];
print "<br>Password: " . $row["Password"];
}
?>