PHP register form was working and now doesnt work after i've made no changes
my registration no longer works, but i havent made any changes to it, why would this be? the only change i made was going into the database and change to id of 1 user and deleting 2 others.  here is my code:

    include 'scripts/global.php';

    // Register attempt  
    if(isset($_POST['registerSubmit']) && $_POST['registerSubmit'] == 'true'){
	$username = trim($_POST['username']);  
    $email = trim($_POST['email']);  
    $password = trim($_POST['password']);  
    $confirmPassword    = trim($_POST['confirmPassword']);  
	
	if(!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email))  
        $errors['email'] = 'Your email address is invalid.';  
  
    if(strlen($password) < 6)  
        $errors['password'] = 'Your password must be greater than 6 characters.';  
  
    if($password != $confirmPassword)  
        $errors['confirmPassword'] = 'Your passwords did not match.';  
  
    // Check to see if we have a user registered with this email address already  
    $query = 'SELECT * FROM users WHERE email = "' . mysql_real_escape_string($email) . '" LIMIT 1';  
    $result = mysql_query($query);  
    if(mysql_num_rows($result) == 1)  
        $errors['email'] = 'This email address already exists.';
		
	//Check if username is already taken
		 $queryuser = 'SELECT * FROM users WHERE username = "' . mysql_real_escape_string($username) . '" LIMIT 1';  
    $result = mysql_query($queryuser);  
    if(mysql_num_rows($result) == 1)  
        $errors['username'] = 'This username is already taken.';
		
		 
  
    if(!$errors){  
        $queryFinal = 'INSERT INTO users SET email = "' . mysql_real_escape_string($email) . '", 
                                                                        password = MD5("' . mysql_real_escape_string($password) . '"), 
                                                                        date_registered = "' . date('Y-m-d H:i:s') . '",
																		username = "' . mysql_real_escape_string($username) . '"';
  
        if(mysql_query($queryFinal)){  
            $success['register'] = 'Thank you for registering. You can now log in on the right.';  
        }else{  
            $errors['register'] = 'There was a problem registering you. Please check your details and try again.';  
        }  
    }  
  
    }  
PHP register form was working and now doesnt work after i've made no changes
===

my registration no longer works, but i havent made any changes to it, why would this be? the only change i made was going into the database and change to id of 1 user and deleting 2 others.  here is my code:

    include 'scripts/global.php';

    // Register attempt  
    if(isset($_POST['registerSubmit']) && $_POST['registerSubmit'] == 'true'){
	$username = trim($_POST['username']);  
    $email = trim($_POST['email']);  
    $password = trim($_POST['password']);  
    $confirmPassword    = trim($_POST['confirmPassword']);  
	
	if(!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email))  
        $errors['email'] = 'Your email address is invalid.';  
  
    if(strlen($password) < 6)  
        $errors['password'] = 'Your password must be greater than 6 characters.';  
  
    if($password != $confirmPassword)  
        $errors['confirmPassword'] = 'Your passwords did not match.';  
  
    // Check to see if we have a user registered with this email address already  
    $query = 'SELECT * FROM users WHERE email = "' . mysql_real_escape_string($email) . '" LIMIT 1';  
    $result = mysql_query($query);  
    if(mysql_num_rows($result) == 1)  
        $errors['email'] = 'This email address already exists.';
		
	//Check if username is already taken
		 $queryuser = 'SELECT * FROM users WHERE username = "' . mysql_real_escape_string($username) . '" LIMIT 1';  
    $result = mysql_query($queryuser);  
    if(mysql_num_rows($result) == 1)  
        $errors['username'] = 'This username is already taken.';
		
		 
  
    if(!$errors){  
        $queryFinal = 'INSERT INTO users SET email = "' . mysql_real_escape_string($email) . '", 
                                                                        password = MD5("' . mysql_real_escape_string($password) . '"), 
                                                                        date_registered = "' . date('Y-m-d H:i:s') . '",
																		username = "' . mysql_real_escape_string($username) . '"';
  
        if(mysql_query($queryFinal)){  
            $success['register'] = 'Thank you for registering. You can now log in on the right.';  
        }else{  
            $errors['register'] = 'There was a problem registering you. Please check your details and try again.';  
        }  
    }  
  
    }  