wpmcgirth Posted January 18, 2007 Share Posted January 18, 2007 Hello. I'm having some trouble putting my website to work. It used to work before on another host, but it doesn't work on my current one.Here's the piece of code i'm having trouble with:[code]<?PHP if($section=="home") {include "main.php";} elseif($section=="link") {include "link.php";} elseif($section=="contact") {include "contact.php";} elseif($section=="devs") {include "devs.php";} elseif(!$page) {include "main.php";} ?>[/code]No matter what's after the ? on the address bar, it always includes main.php on the page. and if i comment the elseif(!$page) part, like this:[code]<?PHP if($section=="home") {include "main.php";} elseif($section=="link") {include "link.php";} elseif($section=="contact") {include "contact.php";} elseif($section=="devs") {include "devs.php";} /* elseif(!$page) {include "main.php";} */?>[/code]it includes nothing.Anyone could help? Link to comment https://forums.phpfreaks.com/topic/34786-query-string/ Share on other sites More sharing options...
Hypnos Posted January 18, 2007 Share Posted January 18, 2007 $section probably isn't the right var. You probably want $page. Link to comment https://forums.phpfreaks.com/topic/34786-query-string/#findComment-163961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.