I have the code below which I got from the php: mktime manual just edited it to use my own variables but for the day I always get “1”.
$requested_day = $_GET['day'];
$requested_month = $_GET['month'];
$requested_year = $_GET['year'];
if (!empty ($requested_day) || empty ($requested_month) || empty ($requested_year))
{
echo $requested_day. " ".$requested_month." ".$requested_year." is on day : ". date("1", mktime(0, 0, 0, $requested_month, $requested_day, $requested_year));
}
I enter the values and it is outputted as:
23 09 2010 is on day : 1
I think I am having a problem on the “1” I entered on the date, I don’t quite understand what this is actually for?
Thanks
Your format string should have a lower case L not a number one.
The “l” in the format string says to show the day of the week.