the code below shows the inputting of a future date into a database
$month = date("m");
$day = date("d");
$year = date("Y");
print "day: <select name=day id=day>\n";
for ($count = 1; $count <=31; $count++) {
if ($count == $day) {
print "<option selected>$count\n";
} else {
print "<option>$count\n";
}
}
print "</select>/ month: <select name=month id=month>\n";
for ($count = 1; $count <= 12; $count++) {
if ($count == $month) {
print "<option selected>$count\n";
} else {
print "<option>$count\n";
}
}
print "</select>/ year: <select name=year id=year>\n";
print "<option selected>$year<option>" . ($year + 1) . "</select>\n";
the next part of the code combines the $year, $month and the $day into a single $date variable....
$date = $year . '-' . $month . '-' . $day;
ie the $date is in the form yyyy-mm-dd.
problem... when i recall $date from the database , no matter what the $date is, it always comes out as today's date.
can anyone give me a code that would print the actual inputed $date in the form such as "January 10th, 2003" for example (or whatever the date that was inputed)??
(i think i just confused myself even more)