Inserting date automatically into a from field?
Moderator: General Moderators
Inserting date automatically into a from field?
I'm sure this is really simple but can't manage to do it. I want to insert the date automatically into a form field so the user doesn't have to type it themselves. Please help!
Code: Select all
<?php
$date = date("l, F d, Y");
echo "<form action="page.php" method="POST">";
echo "<text input=text value="$date" name=blah>";
etc etc
?>kudos
-
andylyon87
- Forum Contributor
- Posts: 168
- Joined: Sat Jan 31, 2004 5:31 am
- Location: Dundee
There is a date function in php where different letters stand for different things:
eg
date(M);
would show jun
if you go on http://www.php.net and search date it should tell you the other options
eg
date(M);
would show jun
if you go on http://www.php.net and search date it should tell you the other options