Q: front-end user register in wordpress not getting values to the database I'm doing a front end user register page, I created a page in wordpress, then choose template "Register" so I could use my register.php file to add all of the functions, however, it won't add the values to MySQL Database, I have no idea why, i've tryed everything, but I can't find a solution.
When pressing F12 in my browser(chrome), I'm able to see in the network tab how the values did find their way in, but I cant add them to the database.
I've done other user oriented website and never had this problem, here is my code:
<?php
/*
Template Name: Register
*/

get_header(); ?>



<?php
if(isset($_POST['submit'])){

    $email1 = $_POST['email1'];
    $email2 = $_POST['email2'];
    $pass1 = $_POST['pass1'];
    $pass2 = $_POST['pass2'];

    if($email1 == $email2){
        if($email1 == $email2)
        {
            $user_login = $_POST['uname'];
            $user_email = $_POST['email1'];
            $user_pass = $_POST['pass1'];

            $user_id = wp_create_user( $user_login, $user_email, $user_pass  );


        }else{
            echo "Sorry, your passwords do not match <br/>";
        }
    }else{
        echo "Sorry your Emails dont match <br/>";
        exit();
    }

}else{
    $form = <<<EOT
    <form action="register.php" method="POST">
        First Name: <input type="text" name="name"/> <br/>
        Last Name:  <input type="text" name="lname"/> <br/>
        Username:   <input type="text" name="uname"/> <br/>
        Email:  <input type="text" nam="email1"/> <br/>
        Confim Email:   <input type="text" name="email2"/> <br/>
        Password:   <input type="password" name="pass1"/> <br/>
        Confirm Password:   <input type="password" name="pass2"/> <br/>
        <input type="submit" value="Register" name="submit"/>
    </form>
EOT;

echo $form;
}

?>

<?php get_footer(); ?>


A: The function wp_create_user takes the parameters in this order: $username, $password, and $email.
So, it should read: 
$user_id = wp_create_user( $user_login, $user_pass, $user_email );

