Simple activation script
Appears you are storing cleartext passwords and doing a 1:1 comparison.  This is bad.  

You can clean the code up by doing the following and executing 1 query to MySQL:

require_once('mysqli.php');  
// successful login variables  
$q = $dbc -&gt; prepare("SELECT email,dbClearTextPassword,accountActive FROM accounts WHERE email = ?"); 
$q -&gt; bind_param('s', ($_POST['email']));  
$q -&gt; execute(); 
$q -&gt; store_result();

// check to see if you returned any information from your query
if ($q-&gt;num_rows == 0) { 
  // email doesn't exist in db .. #fail
  exit;
}

if ($q['accountActive'] != '1') { 
  // email account is not active .. #fail
  exit;
}

// check the password matches 
if ($_POST['clearTextPassword'] == $q['dbClearTextPassword']) { 
  // do some of your fancy code to process the successful login
} else { 
  // do some other fancy code to process a login failure
}

$dbc-&gt;close();