Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require("inc/db.php");
- ?>
- <?php
- if (!empty($_POST)){
- $form = $_POST;
- $username = $form[ 'uname' ];
- $password = $form[ 'pword' ];
- $email = $form[ 'email' ];
- $bday = $form[ 'bday' ];
- $sql = "INSERT INTO users ( username, password, email, bday ) VALUES ( :username, :password, :email, :bday )";
- $query = $conn->prepare( $sql );
- $result = $query->execute( array( ':username'=>$username, ':password'=>$password, ':email'=>$email, ':bday'=>$bday ) );
- if($result){
- header("Location:login.php");
- }else{
- echo "There was a problem with your registration!";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement