Posted: Wed Oct 20, 2004 9:52 am
you need to use now() for both fields.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$query = 'IN.SERT INTO news (text, author, email, date, time, title) VALUES(''' . $_POST['text'] .''', ''' . $_POST['author'] .''', ''' . $_POST['email'] . ''', '''. 'NOW()' . ''', '''. 'NOW()' . ''', ''' . $_POST['title'] . ''')';
$result = mysql_query($query,$db);Code: Select all
... 'I-N-SERT INTO ...Code: Select all
$query = "INS ERT INTO news (text, author, email, date, time, title) VALUES('". $_POST['text'] ."', '". $_POST['author'] ."', '". $_POST['email'] ."',now(),now(),'".$_POST['title']."');";