query('SELECT * FROM Users WHERE Username="'.$input_name.'";'); if($res->num_rows >= 1) { header("Location: /Sign Up.php?error=USERNAME_TAKEN&email=".$_POST['email']."&username=".$_POST['username']); exit(); } $res = $conn->query('SELECT * FROM Users WHERE Email="'.$input_email.'"'); if($res->num_rows >= 1) { header("Location: /Sign Up.php?error=EMAIL_TAKEN&email=".$_POST['email']."&username=".$_POST['username']); exit(); } try { $conn->query('INSERT INTO Users (Username, Email, Password) VALUES ("'.$input_name.'", "'.$input_email.'", "'.$input_password.'");'); } catch(Exception $e) { echo $e->getMessage(); } } else { header("Location: /register.php"); exit(); } ?> Successful Registration
Green Tick Icon

You have successfully registered

You may now log in

Log In