I have a table with a TIMESTAMP field. I want it to update the TIMEDATE each time the record has an UPDATE. So I added a hidden input type tag and put <? now(); ?> in the value with the column name in the name. The php is giving me an error. Am I not doing this correctly?
MySQL db by the way.
now() in hidden form tag
Moderator: General Moderators
now() is a myssql function. If you are looking to do this in php check out [php_man]mktime[/php_man] [php_man]date[/php_man] and [php_man]time[/php_man].
When I insert dates I use the following query:
When I insert dates I use the following query:
Code: Select all
<?php
$qry = "INSERT INTO TBL_NAME(ID,DTTM) VALUES (1,now())";
?>another question
Is there no way to declare it as a variable? Or call it from the server as a variable?