June 28th, 2000, 08:59 AM
Join Date: Jun 2000
Location: London, England
Time spent in forums: < 1 sec
Reputation Power: 14
I'm just starting in PHP so this may seem obvious, please bear with me.
I have an input form for users and I want to give the date input box the value of today's date.
This is what I have so far for the first page:
$db = mysql_connect("localhost", "webuser@localhost");
$result = mysql_query ("SELECT curdate()");
print "Date = ";
This returns a value of 2.
Then I have a page which writes this date input box:
print ("<li> Date:</li>");
print ("<input type='Text' name='Title' value='$result'>");
This returns doesn't even insert the 2 value. Perhaps I don't need 2 php pages to do this? Any ideas?
Cheers in advance.