Forget about the PHP functions and do this:

$query  = "INSERT INTO tablename ";
$query .= "SET field1 = '$field1', ";
$query .= "field2 = '$field2', ";
$query .= "datesubmitted = NOW();

Let MySQL simply do this for you with the NOW() SQL command.

> -----Original Message-----
> From: Jerry Lake [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 07, 2001 5:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] on the list yesterday regarding mysql time
> 
> 
> I know this was on the list yesterday,
> but I for some reason erased it.
> 
> I have an online form that I would like
> to have record the time submitted and
> recorded into a MySQL date field, how
> the hell do I use the date and mktime
> functions to make the date compatible
> with the MySQL 0000-00-00 format?
> 
> Jerry Lake            - [EMAIL PROTECTED]
> Web Designer
> Europa Communications - http://www.europa.com
> Pacifier Online           - http://www.pacifier.com
> 
> 
> -----Original Message-----
> From: george [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 07, 2001 1:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] passing variables again
> 
> 
> 
> not really sure I understand,
> 
> but what I want to do is take the HTML generated in step 3 and place it
> between the <form> tags in the last page where the code is displayed
> 
> ie
> 
> <td>Title</td><td> mr</strong><input type=radio name=title 
> value=mr checked>
> 
> mrs</strong><input type=radio name=title value=mrs>
> 
> Miss</strong><input type=radio name=title
> value=miss><br></td></tr><td>name</td><td><input type=text
> name=name></td></tr><tr><td>address</td><td><input type=text
> name=address></td></tr><td>address2</td><td><input type=text
> name=address2></td></tr><td valign="top">message</td><td><textarea
> name="message" cols= rows=></textarea></td></tr>
> 
> that is the code from step 3 how do I get that to display on the 
> next page.
> 
> 
> 
> TIA
> 
> 
> george
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to