I've exhausted other avenues so thought I'd draw on the collective PHP intelligence of the Dolphin forum. I have a busy Dolphin site but also a non-Dolphin site (completely unrelated to dating/social networking etc). Anyway, we have many PHP pages with ID's in the URL - this is all fine and dandy, however, when a non-existant ID is manually entered to the end of the URL a "Warning: Divide by zero etc." status is shown (because the ID does not exist in the database). So, to avoid URL's without an id rendering an actual page (apart from the redirect shown) I have the below code which works for that side of it:
$id=$_GET['id'];
if (!preg_match('/^[0-9]{1,}$/',$id))
header ("Location:index.php");
However, do you have any ideas how to redirect users who decide to go it alone and insert an ID number of their own choosing (that does not exist) which would normally result in the design of the page showing up but also with the "Warning: Divide by zero" string showing?
Bottom line: I need some way to redirect PHP pages that have a non-existant ID.