redfire Posted October 29, 2006 Share Posted October 29, 2006 Okay I'm currently working on a new template, and instead of making a hole new page for every thing I'm setting it up just it just changes the one area.[code]<?php switch($_GET['id']) {default: include('home.php'); break; case 'news': include('news.php'); break; case 'forums': include('forums.php'); break; }?>[/code]and I have the links set-up like[code]<a href="index.php?id=news">News</a>[quote][/quote][/code]I have it set-up like that but it doesn't want to work :( Quote Link to comment Share on other sites More sharing options...
toplay Posted October 29, 2006 Share Posted October 29, 2006 It looks ok except put the "default" case as the last one.See:http://us2.php.net/manual/en/control-structures.switch.php#AEN5024 Quote Link to comment Share on other sites More sharing options...
redfire Posted October 29, 2006 Author Share Posted October 29, 2006 fixed thanks :D 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.