I have read many of the postings regarding current time stamp and tried many of the solutions provided, however none of them fixed my issue. I need a current time stamp to be added to the database. I think my code may be the reason why the other solutions are not working. Everything else post perfectly. The time stamp just gives me all "0", the other solutions I tried gave me a "line 6 error".
Here is my current code
<?php
$con = mysql_connect("mysql","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
/* Prevent duplicate submissions */
if (isset($_COOKIE['FormSubmitted']))
{
show_error('You may only submit this form once per session!');
}
mysql_select_db("seller", $con);
$sql="INSERT INTO listing (name, email, website, url, dropdown, price, date, visitors, income, host, description)
VALUES
('$_POST[name]', '$_POST[email]', '$_POST[website]', '$_POST[url]', '$_POST [dropdown]', '$_POST[price]', '$_POST[date]','$_POST[visitors]', '$_POST[income]', '$_POST[host]', '$_POST[description]', 'CURRENT_TIMESTAMP[subdate]' )";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "Thank you for listing with us. <a href="#">Explore Now</a>";
mysql_close($con)
?>