Auto-fill Date

Is there a way to automatically insert the current date into a form
field with PHP or js? For example, I have 3 (static) form fields
labeled mm dd yyyy. Been searching my php refs but haven’t found
anything.

Todd


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

In your PHP controller:

$y = date(‘Y’,time());
$m = date(‘m’,time());
$d = date(‘d’,time());

In JavaScript, get it like this:

var date = new Date();
var y = date.getFullYear();
var m = date.getMonth() + 1;
var d = date.getDate();

Walter

On May 21, 2009, at 2:51 PM, Todd wrote:

Is there a way to automatically insert the current date into a form
field with PHP or js? For example, I have 3 (static) form fields
labeled mm dd yyyy. Been searching my php refs but haven’t found
anything.

Todd


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options