PHP Page/Address Variables
Posted: Sun Apr 11, 2004 10:07 am
When coding in PHP I've always been able to control content by using code like below (file: main.php):
Then going to http://www.myaddress.com/main.php?nav=login would give me just the contents of login_include.php or going to http://www.myaddress.com/main.php would just echo "Main Page." For some reason, on a fresh PHP installation of a new Win2K server running IIS, I cannot do this. For whatever $nav is, I always get "Main Page" no matter what and there are no error messages. Anyone have any idea why this might be? Is there something in PHP.ini I need to fix or is there something I'm doing wrong in code in a new version of PHP? Thanks in advance for the help!
Ryan
[/big_search]
Code: Select all
<?php
if ($nav=="login") {
include "login_include.php";
} elseif ($nav=="register") {
include "login_register.php";
} elseif ($nav=="") {
echo "Main Page";
}
?>Ryan
[/big_search]