Advertisement
Guest User

Untitled

a guest
Mar 8th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.69 KB | None | 0 0
  1. <?php
  2.     include 'header.php';
  3.    
  4.     $sql = "";
  5.     $first_name = $_POST['first_name'];
  6.     $last_name = $_POST['last_name'];
  7.     $username = $_POST['username'];
  8.     $email_address = $_POST['email_address'];
  9.     $password = $_POST['password'];
  10.     $gender = $_POST['gender'];
  11.     $city = $_POST['city'];
  12.     $country = $_POST['country'];
  13.  
  14.     if(isset($_POST['submit']))
  15.     {
  16.     $sql = "INSERT INTO users (first_name, last_name, username, email_address, password, gender, city, country, verification_code, verified, sign_up_date) VALUES (
  17.     '$first_name',
  18.     '$last_name',
  19.     '$username',
  20.     '$email_address',
  21.     '$password',
  22.     '$gender',
  23.     '$city',
  24.     '$country',
  25.     '1234',
  26.     'Y',
  27.     '08/03/2017')";
  28.         $result = mysqli_query($conn,$sql);
  29.     }
  30.  
  31.     echo "
  32.     <form action='signup.php' method='post'>
  33.     <label id='first_name'> First name</label><br/>
  34.     <input type='text' name='first_name'><br/>
  35.  
  36.     <label id='last_name'> Last name</label><br/>
  37.     <input type='text' name='last_name'><br/>
  38.  
  39.     <label id='username'> Username</label><br/>
  40.     <input type='text' name='username'><br/>
  41.  
  42.     <label id='email_address'>E-mail Address</label><br/>
  43.     <input type='email' name='email_address'><br/>
  44.  
  45.     <label id='password'>Password</label><br/>
  46.     <input type='password' name='password'><br/>
  47.  
  48.     <label id='gender'>Gender</label><br />
  49.     <select name='gender'>
  50.     <option value=''>Select...</option>
  51.     <option value='M'>Male</option>
  52.     <option value='F'>Female</option>
  53.     <option value='N'>Non-binary</option>
  54.     </select><br>
  55.  
  56.     <label id='city'> City</label><br/>
  57.     <input type='text' name='city'><br/>
  58.  
  59.     <label id='country'> Country</label><br/>
  60.     <input type='text' name='country'><br/>
  61.  
  62.     <button type='submit' name='submit'>Sign up</button>
  63.  
  64.     </form>
  65.  
  66.     ";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement