Please help I have been trying to insert a timestamp field into a DB. But to no avail.
Here's my code.
I am using a hidden field.
<input type="hidden" value="<? echo date("m-j-y g:i:s A"); ?>" name="time" />
Then on my action page, I do the following.
$stime=$_POST;
then my insert statement looks like.
$sql="INSERT INTO $tbl_name(username, password, level, email,fname,lname,time)VALUES('$uname', '$pword', '$level','$email','$fname','$lname','$stime')";
I can insert without the time, but i need that. And i need it to be passed from a form field.
My DB set up is.
Column name of time. type is timestamp.
When I insert i receive an error. thats all it says.