I have a table with a date field. In the PHPmaker Add page, I would like to have that field default to today's date. Does anyone have a clue how to accomplish this? (I do not know JavaScript, but I do know PHP if that will help).
Thanks,
Gee
I have a table with a date field. In the PHPmaker Add page, I would like to have that field default to today's date. Does anyone have a clue how to accomplish this? (I do not know JavaScript, but I do know PHP if that will help).
Thanks,
Gee
Answered my own question:
in the default field, simply put:
date("m/d/Y")
making sure that the date is output if the correct format you need it. For details, see the PHP manual on the DATE command.
How about if I want to update due today date when I edit the data. Because there is no 'default value' on edit page (On PHPMAKER application).
You can add the following php code in the Default Value field under the Add Page section: date("Y-m-d H:i:s");