I had the following code, and I keep getting an undefined variable error in the
mysql_query($query) or die;
('Error, insert query failed');
//echo('Data inserted successfully' );
Could anyone suggest something???
[code=php]<?php
// open connection to database
$db = mysql_connect("localhost", "root", "");
if (!$db)
{
print "unable to connect!";
exit;
}
// set server access variables
extract($_POST);
//select database to use
$db= mysql_select_db ("mapleside");
if (!$db)
{
print "could not select database";
exit;
}
// create SQL query string
//$query = "INSERT INTO customer VALUES ('$customer_Lname', '$customer_Fname', '$Customer_address', '$Customer_city', '$Customer_state', '$Customer_zipcode', 'Customer_Email', 'Customer_UserName', 'Customer_Password')";
mysql_query($query) or die;
('Error, insert query failed');
//echo('Data inserted successfully' );
//close connection
mysql_close();
// This will have to be adjusted once the pages are completed.
header("Location: http://localhost/???????????.php")
?>