Nothing to $_GET[] - Solved
Posted: Thu Apr 03, 2008 11:00 am
I think I might have painted myself into a corner. In streamlining my site, everything runs off two switch statements on a template page, which happens to be my index page. I use mod_rewrite to switch my "modes". So, index.html = index.php?mode=1. The problem is if you go to http://www.mysite.com, index.html is not in the url...nothing to rewrite. My idea was, if there is nothing to get, then set the variable to 1 but it doesn't seem to work. Any ideas?
Code: Select all
if(isset($_GET['mode'])){
if(!is_numeric($_GET['mode'])){
error("numeric");
}else{
$mode=$_GET['mode'];
}
}else{
$mode=1;
}