Is my PHP code bad?
I'm new to OO-PHP. I'm just curious to know what you expert programmers think about following piece of code. Is it very horrible and ugly. Thanks.

    	function signup($username, $password, $email, $capt_error){
       
        //validate username.
    	if(!$this->valid_length($username)){
    			$this->signup_error = "Username should be 5 - 15 characters. <br />";	
    	}else if(!$this->alpha_numeric($username)){	
    			$this -> signup_error ="Only letters, numbers";		
    	} else if($this->username_unallowed($username)){ 
    			$this -> signup_error ="Not allowed.";
    	} else if ($this->username_exists($username)){
    			$this -> signup_error ="Username already exists. <br />";
    	}
    	
    	//validate password.
       if (!$this->valid_length($password) ){	
    			$this -> signup_error .="Password should be 5 - 15 characters. <br />";
    		}
    	
    	//validate email.
    	if (!$this->valid_email($email) ){	
    			$this -> signup_error .="Invalid email.";
    	}else if($this->email_exists($email)) {
    			$this -> signup_error .="Email exists.<br />";	
    		}
    				
    	//captcha error
    	if($capt_error == 1){
    	$this -> signup_error .="Invalid captcha. <br />";	
    	}
    		
    	//no any error, proceed.
    	if ($this->signup_error == ""){
    		$hashed_password = $this->hash_password($password);
    		if ($this->insert_new_user($username, $enc_password, $email)){
    		$_SESSION['username']=$username;	//login user.
    		header("Location: welcome.php");
    		}else {
    		$this->signup_error = "Unknown error. <br />";
    		}		
    	}
    			
    	}
Is my PHP code bad?
===

I'm new to OO-PHP. I'm just curious to know what you expert programmers think about following piece of code. Is it very horrible and ugly. Thanks.

    	function signup($username, $password, $email, $capt_error){
       
        //validate username.
    	if(!$this->valid_length($username)){
    			$this->signup_error = "Username should be 5 - 15 characters. <br />";	
    	}else if(!$this->alpha_numeric($username)){	
    			$this -> signup_error ="Only letters, numbers";		
    	} else if($this->username_unallowed($username)){ 
    			$this -> signup_error ="Not allowed.";
    	} else if ($this->username_exists($username)){
    			$this -> signup_error ="Username already exists. <br />";
    	}
    	
    	//validate password.
       if (!$this->valid_length($password) ){	
    			$this -> signup_error .="Password should be 5 - 15 characters. <br />";
    		}
    	
    	//validate email.
    	if (!$this->valid_email($email) ){	
    			$this -> signup_error .="Invalid email.";
    	}else if($this->email_exists($email)) {
    			$this -> signup_error .="Email exists.<br />";	
    		}
    				
    	//captcha error
    	if($capt_error == 1){
    	$this -> signup_error .="Invalid captcha. <br />";	
    	}
    		
    	//no any error, proceed.
    	if ($this->signup_error == ""){
    		$hashed_password = $this->hash_password($password);
    		if ($this->insert_new_user($username, $enc_password, $email)){
    		$_SESSION['username']=$username;	//login user.
    		header("Location: welcome.php");
    		}else {
    		$this->signup_error = "Unknown error. <br />";
    		}		
    	}
    			
    	}