Ok this is my form
<head>
<title>Mapleside Farms</title>
<link rel="stylesheet" href="mapleside.css" type="text/css" />
</head>
<form name = "account" action="account.php" method = "post">
Enter information
<input Customer_Lname=Customer_Lname>
<br>
<input type=submit value="go">
<br>
<input Customer_Fname=Custome_Fname>
<br>
<input type=submit value="go">
<br>
<input Customer_address=Customer_address>
<br>
<input Customer_city=Customer_city>
<br>
<input Customer_state=Customer_state>
<br>
<input Customer_zipcode=Customer_zipcode>
<br>
<input Customer_email=Customer_email>
<br>
<input Customer_username=Customer_username>
<br>
<input Customer_password=Customer_password>
<br>
</form>
And this is my php page
<?php
$Customer_Lname=$_POST['lastname'];
$Customer_Fname=$_POST['firstname'];
$Customer_address=$_POST['address'];
$Customer_city=$_POST['city'];
$Customer_state=$_POST['state'];
$Customer_zipcode=$_POST['zipcode'];
$Customer_email=$_POST['email'];
$Customer_username=$_POST['username'];
$Customer_password=$_POST['password'];
// open connection to database
$db = mysql_connect("localhost", "root", "");
if (!$db)
{
print "unable to connect!";
exit;
}
//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 (Customer_Lname, Customer_Fname, Customer_address, Customer_city, Customer_state, Customer_zipcode, Customer_email, Customer_username, Customer_password) VALUES ($Customer_Lname, $Customer_Fname, $Customer_address, $Customer_city, $Customer_state, $Customer_zipcode, $Customer_email, $Customer_username , $Customer_password)";
$result = mysql_query($query);
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.
?>
When I run this, I am still geting an undefined index error, but I think it might have something to do with an array????