Created
May 22, 2017 09:32
-
-
Save rintoug/a01c448c08cbb4ecb2d1e1b16b9e935a to your computer and use it in GitHub Desktop.
PHP User Registration Form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="container" style="width:500px;background:#E6EFCB;"> | |
| <?php if(!empty($error)):?> | |
| <div class="alert alert-danger"> | |
| <?php foreach($error as $value):?> | |
| <?php print $value?><br> | |
| <?php endforeach;?> | |
| </div> | |
| <?php endif;?> | |
| <?php if(isset($_GET['msg'])&& $_GET['msg']==1):?> | |
| <div class="alert alert-success"> <strong>Success!</strong> Regsitered successfully. </div> | |
| <?php endif;?> | |
| <form method="post"> | |
| <div class="form-group"> | |
| <label for="Username">Username</label> | |
| <input type="text" class="form-control" id="username" name="username" placeholder="Username" value="<?php if(isset($_POST['username'])) echo $_POST['username']; ?>"> | |
| </div> | |
| <div class="form-group"> | |
| <label for="Firstname">Firstname</label> | |
| <input type="text" class="form-control" id="firstname" name="firstname" placeholder="Firstname" value="<?php if(isset($_POST['firstname'])) echo $_POST['firstname']; ?>"> | |
| </div> | |
| <div class="form-group"> | |
| <label for="Lastname">Lastname</label> | |
| <input type="text" class="form-control" id="lastname" name="lastname" placeholder="Lastname" value="<?php if(isset($_POST['lastname'])) echo $_POST['lastname']; ?>"> | |
| </div> | |
| <div class="form-group"> | |
| <label for="Email">Email</label> | |
| <input type="email" class="form-control" id="email" name="email" placeholder="Email" value="<?php if(isset($_POST['email'])) echo $_POST['email']; ?>"> | |
| </div> | |
| <div class="form-group"> | |
| <label for="Password">Password</label> | |
| <input type="password" class="form-control" id="password" name="password" placeholder="Password"> | |
| </div> | |
| <div class="form-group"> | |
| <label for="Confirm Password">Confirm Password</label> | |
| <input type="password" class="form-control" id="confirm_password" name="confirm_password" placeholder="Confirm Password"> | |
| </div> | |
| <div class="form-group"> | |
| <label for="Gender">Gender</label> | |
| <label class="radio-inline"> | |
| <input type="radio" name="gender" value="male" checked> | |
| Male </label> | |
| <label class="radio-inline"> | |
| <input type="radio" name="gender" value="female"> | |
| Female </label> | |
| </div> | |
| <button type="submit" class="btn btn-primary">Register</button> | |
| <br><br> | |
| </form> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment