Origin Posted December 28, 2005 Share Posted December 28, 2005 I'm having a problem with a site I made. I know the server supports PHP cuz I have used it before.http://gfxsector.netThe php navigation is acting weird..The include is working because its incuding CuteNews... but it doesnt work when I click the other links.It brings the default page up no matter what link I choose. Include in the main content box <?phpswitch($id) {default:include('cutenews/show_news.php'); break; case "1": include('cutenews/show_news.php'); break; case "2":include('dls.htm');break; case "3":include('sotwnews/show_news.php');break; case "4":include('affs.htm');} A Navigation link <a href="index.php?id=3" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('sotw','','images/sotw2.gif',1)"><img src="images/sotw.gif" alt="SOTW" name="sotw" width="25" height="39" border="0"></a> Link to comment Share on other sites More sharing options...
hacknsack Posted December 29, 2005 Share Posted December 29, 2005 This will test if the id is set in the URL, if it is not it's default value will be 0. <?php$id = 0;if(isset($_GET['id']))$id = intval($_GET['id']); switch($id) { case 1: include('cutenews/show_news.php'); break; case 2: include('dls.htm'); break; case 3: include('sotwnews/show_news.php'); break; case 4: include('affs.htm'); break; default: include('cutenews/show_news.php'); break; }?> Post back if you have any questions. Link to comment Share on other sites More sharing options...
Chocolate570 Posted December 29, 2005 Share Posted December 29, 2005 Have you done this yet?$id=$_GET['id'];You have to put the value of the variable into the url to $id, otherwise you can't switch it. Link to comment Share on other sites More sharing options...
Guest chocolates_idol Posted December 29, 2005 Share Posted December 29, 2005 Have you done this yet?$id=$_GET['id'];You have to put the value of the variable into the url to $id, otherwise you can't switch it. <{POST_SNAPBACK}> oh yes. i am slightly fluent in the language hare too. [: Link to comment Share on other sites More sharing options...
aspnetguy Posted December 29, 2005 Share Posted December 29, 2005 hey, dumber things have been overlooked before.Cute name Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now