if ($q -> num_rows == 1) {
$q = $dbc -> prepare("UPDATE accounts SET logcount = '0' WHERE email = ?");
$q -> bind_param('s', ($_SERVER['QUERY_STRING']));
$q -> fetch_array(MYSQLI_ASSOC);
$q -> execute();
echo 'Congratulations ' . $q['username'] . ' your account is now active!
';
}
How come when using $q['username'] it doesn't fetch the row username?
I am new to using prepared statements please forgive me :D!
Thanks.