Posted by Marcin Dobrucki on 07/06/05 14:46
william108@gmail.com wrote:
> I am trying to insert the current date into a database from within an
> HTML_QuickForm document. Any suggestions on how? Also does anyone know
> if it is possible to to use regular php type queries from within a
> HTML_QuickForm document and whether you can put functions (like NOW())
> as an argument to addelement()? Also, are there any forums dedicated to
> PEAR or QuickForm?
I haven't tested this, but in the doc for "prepare" it says that you
can use the "!" placeholder to litelarly insert something. So perhaps
something like "now()" could be added there. But you should be able to
create a correct format of the string with a combo of "date" and
"mktime" functions as well, and then just use "?" placeholder.
Ofcourse, if you always insert "now", you could consider if the
"timestamp" column type would do the trick.
/Marcin
[Back to original message]
|