Ok, So I have a page that I want to display under certain circumstances.
In a nutshell, I have a mysql table named status. In that table a have a field named status. If the word suspended is in that field, I want to re-direct to another page entirely.
I am quite new to php, and I know I am missing something here, just not sure what.
Basically here is my outline:
--Included files--
Query status from status table
if status = suspended,
re-direct to new page stop executing code on this page.
<?
//headers and DB
require_once('db.php');
include('header.php');
$query = "SELECT status from onp_status";
$result = mysql_query($query);
if ($result == 'suspended') {
header("Location: suspend.php");
exit;
}
mysql_free_result($result);
?>
<head>