PHP/MYSQL query error
| From: | Chris Crane | Date: | Mon, 26 Aug 2002 13:41:29 +0000 |
| Subject: | PHP/MYSQL query error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-114138@lists.php.net to get a copy of this message | ||
I am getting a failed query error message. Could someone take a look and let
me know.
//F U N C T I O N S
//=================
function AddSignupRequest($Signup_FName, $Signup_LName, $Signup_Address1,
$Signup_Address2, $Signup_City,
$Signup_State, $Signup_Zip, $Signup_Email, $Signup_Phone,
$Signup_ContactMethod,
$Signup_Date, $Signup_IP, $Signup_Status, $Signup_Comments) {
/* Connecting, selecting database */
$dbh=mysql_connect ($MySQL_Host, $MySQL_User, $MySQL_Password) or die
('I cannot connect to the database.');
mysql_select_db ("havasuin_Signups");
/* Performing SQL query */
$query = "INSERT INTO SignupRequests ('FirstName', 'LastName',
'Address1', 'Address2',
'City', 'State', 'Zip', 'Email', 'Phone',
'ContactMethod', 'Date',
'IP', 'Status', 'Comments')
VALUES ('', 'Chris', 'Crane', '655 Talcottville Road',
'Apt. 185',
'Vernon', 'CT', '06066', 'ccrane@inxdesign.com',
'860-659-6464', 'Email', 'August 25, 2002',
'64.252.232.82', 'Newly
Requested', 'Testing')";
$result = mysql_query($query) or die("Query failed");
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($link);
print "<br>$Signup_LName, $Signup_FName<br>\n";
}