I have 4 drop down lists for Year, Month, Day and last one for flexbility dates (by adding 7 or 14 or 21 days to the date selected)
[CODE]
$startdate = $_GET[‘year’] . “-“. $_GET[‘month’] . “-” . ($_GET[‘day’] – $_GET[‘flexibledate’]);
$enddate = $_GET[‘year’] . “-“. $_GET[‘month’] . “-” . ($_GET[‘day’] + $_GET[‘flexibledate’]);
$q = “select id, name, days, details from tour where (date >= ‘”. $startdate .”‘ and date <= ‘”. $enddate .”‘ ) and country='”. $country .”‘”;
$results = mysql_query($q);
the problem when i add a week to the date 28/12/2007 the result is 35/12/2007 instead of moving to the next month or the next year in this example.
thanks in advance
~Shareb