
June 28th, 2000, 08:59 AM
|
|
Contributing User
|
|
Join Date: Jun 2000
Location: London, England
Posts: 64
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:
<?php
$db = mysql_connect("localhost", "webuser@localhost");
mysql_select_db("mydb",$db);
$result = mysql_query ("SELECT curdate()");
print "Date = ";
print "$result";
?>
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'>");
print ("<br>");
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.
|