I have a quote request form that I'm trying to build.
What happens is that when you submit the form, it creates another row in the database but it's ALL blank!!!
I didn't want to paste my WHOLE code in this thread. I would rather ask what would cause this and what specific part of this general process actually "passes" the data onto the database.
Here are a couple parts of the beast:
<?php
<form name="customers" method="POST" action="QUOTEcustomer.php" >
?>
And then the process peice:
<?php
if (@$_POST['continue'] == "Cancel")
{
header("Location: quote_pt1.php");
}
$Name = $_POST['Name'];
$Address = $_POST['Address'];
$Address2 = $_POST['Address2'];
$City = $_POST['City'];
$Zip = $_POST['Zip'];
$Phone = $_POST['Phone'];
$Fax = $_POST['Fax'];
require("access.php");
$connection = mysql_connect($host,$user,$password)
or die (mysql_error());
$db = mysql_select_db($database,$connection)
or die (mysql_error());
$Name = strip_tags(trim($Name));
$Address = strip_tags(trim($Address));
$Address2 = strip_tags(trim($Address2));
$City = strip_tags(trim($City));
$query = "INSERT INTO customers(Name,Address,Address2,City,Zip,Phone,Fax)
VALUES ('$Name','$Address','$Address2','$City','$Zip','$Phone','$Fax')";
$result = mysql_query($query, $connection)
or die (mysql_error());
$customerid = mysql_insert_id();
?>
That's pretty much the bulk of the PHP involved. Am I missing something?
Thanks for reading this far!
Lucky