//checks to see if error message is empty, if so continues if not throws error
if(empty($ERRmsg))
{
//If everything passes connects back to Database and updates to make account active
$update = $wdp->prepare(
"UPDATE
Users
SET
Active = '1'
Where
Random_Key= :key
");