View Single Post
Old 10-12-2007, 09:03 PM   #3 (permalink)
obolus
The Acquainted
 
obolus's Avatar
 
Join Date: Oct 2007
Location: florida
Posts: 110
Thanks: 36
obolus is on a distinguished road
Default

heh, true. Thanks for the feedback!

I put up simple but nice custom error pages for 401, 403, 404, 500, and 503 errors.

One thing I need to do is find a way to redirect the user in a similar situation. Right now, the url system uses a bunch of elseif statements to determine what page to display to the user. If I put in a bad query (ie page.php?wrong instead of page.php?right) in my browser, I just get a blank page.

The elseif statements look like so (dont mind the messy code)...

PHP Code:
<?php
if(!$_SERVER['QUERY_STRING']) { ?> 

<?php
// blank query displays default page (index.php)
?>

<? elseif ($_SERVER['QUERY_STRING'] == "page"?>

<?php
// display page with index.php?page as url
?>
So, and especially in the future when I might be working with session id's for users (appended to the end of url's), how do I code it to look for bad queries? Thanks all.
obolus is offline  
Reply With Quote