hullcalendar Posted October 22, 2011 Share Posted October 22, 2011 hey guys, im trying to create a local event website displaying a calendar for each month showing local events. now i haven't got around to actually setting up the database yet so im sure i will be back with more questions about that soon, however im just trying to get the site frame work and im using a lot of includes as the site is subject to a lot of change etc. \ now basically i have a page called 'whatson.php' which im using this code to switch the include depending on the link clicked <?php switch($_GET['changePage']) { default: case 'default': include('test1.php'); break; case 'january': include('january.php'); break; case 'february': include('february.php'); break; case 'march': include('march.php'); break; case 'april': include('april.php'); break; case 'may': include('may.php'); break; case 'june': include('june.php'); break; case 'july': include('july.php'); break; case 'august': include('august.php'); break; case 'september': include('september.php'); break; case 'october': include('october.php'); break; case 'novemeber': include('novemeber.php'); break; case 'december': include('december.php'); break; } ?> now what i want is the default page at the to to display the current month, so i was wondering if there is anyway somebody could help me out with a code that gets the current month from the server or somewhere and inserts it into the default month part at the top of that code... any help would be amazing Quote Link to comment Share on other sites More sharing options...
hullcalendar Posted October 22, 2011 Author Share Posted October 22, 2011 im really new to php so the only thing i have come up with is something like this, of course it doesn't work but im only at the start of my php for beginners book ha! <?php date_default_timezone_set('GMT'); $date = "date('F')"; include("'$date'.php"); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.