I am really stuck with any idea on how to do this. It is really confusing. Is there any way in PHP that i can select only one day of the week. My scenario is that people are only allowed to make reservations on a Friday. Is there any way i can pull only Friday and use it with date() or strftime()? And use it in drop down boxes(menus)?
$pf_time1 = strtotime("next Friday");
$pf_date1 = date("Y-m-d h:i:s", $pf_time1);
//$pf_date1 = date("Y-m-d 00:00:00",$pf_time1); use if use don't want time only date display
store your date in database check_date column or depends on your logic check
$sql=mysql_query("select check_date from table where check_date=curdate() ")or die("Error: ".mysql_error());
$sql=mysql_query("select check_date from table where check_date=now() ")or die("Error: ".mysql_error());
//do what ever you want
//use it in drop down boxes(menus)
These are both very good ideas but i just realised what i said. Instead of making only on friday i meant making only for friday. So the client can only make appointments for friday. i.e mon-thurs and sat-sun are not an option. So when they go on the form and select an appointment time it will be put in the database as eg 19 december 2008 12:15(which is a friday) or if they would like to book for next week friday they would select 26 december 2008 16:00 which is also a friday.
I think in short i need drop downs that only show fridays for selection