View Single Post
  #2 (permalink)  
Old November 11th, 2005, 11:40 AM
tonyrosen tonyrosen is offline
Authorized User
 
Join Date: Nov 2005
Location: Houston, TX, .
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via Yahoo to tonyrosen
Default

sure it is ...

<?
// make your database connection
// grab recordset
// check to see if the recordset is empy
if ($your_record_set is empty) {
    header("Location: /page.php");
} else {
    // work with the record set.
}
?>

The catch is that this has to be at the top of the page before browser headers are sent. Top lines, no whitespace above it and no HTML above it.