twinklerip Posted February 3, 2006 Share Posted February 3, 2006 i got this example somewhere <?phpini_set("register_globals", "on");if($_SERVER['QUERY_STRING'] == "") { // Main Page echo "main page!!";} elseif($_SERVER['QUERY_STRING'] == "about") { // About page echo "about page!!";} elseif($_SERVER['QUERY_STRING'] == "contact") { // Contact page echo "contact page!!";} else { // Page not found echo "Oops.. Page not found (404)";}?> when i use http://localhost/Untitled-2.phpit says Notice: Undefined index: QUERY_STRING in c:\Inetpub\wwwroot\Untitled-2.php on line 12main page!!how do i get rigd of the notice?and one more thing what is ini_set("register_globals", "on") for? 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