Hey guys
I’m working on a booking system for a friend. Here is the project so far:
www.swerv.ajlx.co.uk
I’m currently having issues with the diary bit. I’m struggling to get the year’s and months to cycle through when the ‘<’ and ‘>’ buttons are used. The main issue is getting the week buttons to cycle the dates along on the sat sun mon… headings.
My first idea was to try something like this:
[php]echo "<a href=’{$_SERVER[‘PHP_SELF’]}?nextyear=nextyear’> > ";[/php]
I am then checking the url, and then trying to implement this code:
[php] if($_GET[‘nextyear’]==“nextyear”)
$year = strtotime(date(“Y”, strtotime($date)) . " +1 year");
else($year = date(‘Y’));[/php]
Can any one see what is obviously wrong with the above code? Can you also suggest how I might do the weeks section?
Regards
Andy Jones