I see, guess that is a personal preference thing, for me, i find codes easier to read where every "if" statement is seperate, others prefer to use "else if" too, whereas i don't like using them. Doubt it makes much difference which way you use it to be honest. Maybe you could tell me if there is a reason to use "else if" over "if's and exits" ?
<?php
// If it doesn't exist, the page exit()'s
$this_q = sprintf
(
// The main query
"SELECT * FROM `table_name` WHERE `row_name` = ('%u')",
// The argument
$_GET['id']
);
$DoesExist = mysql_query($this_q) or die (mysql_error());
if(!mysql_num_rows($DoesExist))
{
echo 'This feature does not exist.';
// Change to your footer file/function
include "footer.html";
exit();
}
?>
Sure does block the insert query in the page if that is above it, all data is checked before this also, so should be pretty secure