Datestamp in html??
| From: | Avern Williams | Date: | Mon, 01 Jul 2002 06:49:40 +0000 |
| Subject: | Datestamp in html?? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-5115@lists.php.net to get a copy of this message | ||
Hi,
I'm pretty new to smarty and to php. What I want to do is have the curent date appear in a smarty template. The date can be in %m/%d/%y format, and it will be used as a hidden tag in a form.
I've tried putting <INPUT TYPE=HIDDEN NAME="dateposted" VALUE="{$smarty.now|date_format:"%D"}"> in my smarty template, but it gets hung (understandably) on the double quotes. I've also tried <INPUT TYPE=HIDDEN NAME="dateposted" VALUE="{$smarty.now|date_format:'%D'}"> but that didn't work either. Does anyone have any suggestions?
My ultmate goal is to put the current date into a mysql date field after the form is submitted. Would it be better to just have some php code get the current and then pass it to the template?
thanks,
Avern
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com