I have a Contact Us submission form on my web site (mconchicago.com/Contact_Us).
It is supposed to be set up so that every submission gets an autonumber and a current timestamp. Everyting is working now except the timestamp, which is bringing me to the verge of madness. Each time it is all zeros.
This is what the records look like when uploaded:
http://www.mconchicago.com/Screenshots/Records.jpg
This is how I have the timestamp field configured:
http://www.mconchicago.com/Screenshots/Structure.jpg
And here is my last attempt at making the PHP work:
<?
$id=$_POST['mysql_insert_id()'];
$first_name=$_POST['first_name'];
$last_name=$_POST['last_name'];
$company=$_POST['company'];
$email=$_POST['email'];
$address=$_POST['address'];
$city=$_POST['city'];
$state=$_POST['state'];
$zip=$_POST['zip'];
$phone=$_POST['phone'];
$reason=$_POST['reason'];
$comments=$_POST['comments'];
$timestamp=$_POST['UNIX_TIMESTAMP()'];
mysql_connect("emellis2002.db.9243147.hostedresource.com", "emellis2002", "Newpwd99@") or die(mysql_error());
mysql_select_db("emellis2002") or die(mysql_error());
mysql_query("INSERT INTO `data` VALUES ('$id', '$first_name', '$last_name', '$company', '$email', '$address', '$city', '$state', '$zip', '$phone', '$reason', '$comments', 'timestamp')");
Print "Your information has been received. Thank you for getting in touch.<br><br>";
Print "<a href=http://www.mconchicago.com/Contact_Us.html>CLICK HERE</a> to return to our web site."
?>
You can see from the Structure screenshot that I have tried many different syntax combinations without success, looking at many forum postings in the process. What am I missing?
INSERTquery :)