I have an html form that consists of a textarea field and a submit button that goes to a 'do_addrecord.php' file.
The 'do_add' record file contains connection data then the following code:
<pre>
$sql = "
insert into tutor4 (con_id, con_date, con_msg) values ('$con_id', '$now()', '$con_msg')";
$result = mysql_query($sql) or die ("Couldn't insert data.");
?>
</pre>
If I run this sql statement (insert into tutor4 (con_id, con_date, con_msg) values (con_id, $now(), 'This is a test')";
from the command line, it works perfectly and the data is inserted into the fields.
However, running the $sql statement from the above code inserts the con_id and con_msg, but the datetime info is all 0000.
Can someone tell me what I'm doing wrong?
Thanks.