PHP Query String
Posted: Thu Jan 18, 2007 2:22 pm
feyd | Please use
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:
it includes nothing.
Anyone could help?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
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: Select all
<?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: Select all
<?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";
} */
?>Anyone could help?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]