Hi uncfelt1147,
I'm no expert in PHP, just like you I'm a newbie. I find your query statement a little bit long with all those \n's.
This is the code from Larry's book:
$q = "UPDATE users SET active=NULL WHERE (email='" . mysqli_real_escape_string($dbc, $_GET['x']) . "' AND active='" .mysqli_real_escape_string($dbc, $_GET['y']) . "') LIMIT 1";
I check always with phpMyAdmin that the person I'm activating is recorded in my database.