I have combined two peices of insert code however it now creates the register error "There was a problem registering you. Please check your details and try again."

It must be a bad logic in the insert code. Can anyone advise how it should be laid to logically please?


Code:
		    if(!$errors){  
        $query = mysql_query("INSERT INTO users 
        (firstname, surname) VALUES ('" . $firstname . "', '" . $surname . "')");		
        "' . mysql_real_escape_string($registerEmail) . '";
		        'password = MD5("' . mysql_real_escape_string($registerPassword) . '")';
        'date_registered = "' . date('Y-m-d H:i:s') . '"';  
                          
        if(mysql_query($query)){  
                                $success['register'] = 'Thank you for registering. You can now log in on the left.';  
                        }else{  
                                $errors['register'] = 'There was a problem registering you. Please check your details and try again.';  
                                
                                  }