isUserExisted($username)) { // user already existed die ("User already existed with " . $username); } else { // create a new user $user = $db->storeUser($name, $username, $password); if ($user) { // user stored successfully echo "User saved!" ."
". "Click here to continue"; } else { // user failed to store die("Unknown error occurred in registration!"); } } } else { die ("Required parameters (name, username or password) is missing!"); } ?>