<?php
extract($_GET);
date_default_timezone_set("Asia/Calcutta");
$insertdate = date("h:i:s d-m-Y ");
if(isset($submit)){
     $ip=$_SERVER['REMOTE_ADDR'];
$sql=mysqli_query($conn,"UPDATE `user` SET `name`='$name', `email`='$email', `password`='$pass1', `mobile`='$mobile', `city`='$city', `date`='$insertdate', `status`='1' WHERE ip='$ip'");
}
?>
<!-- <script>window.location.href = "index.php";</script> -->

<style>
  
.modal-title {
    padding: 0.5em 0em!important;
    font-weight: 800;
}
.modal-header {
    padding: 0px!important;
    border-bottom: 1px solid #e5e5e5;
    text-align: center;
}
.pr{
      background: white;
    padding: 10px;
    text-align: center;
}
.modal-footer {
    padding: 10px!important;
    text-align: center!important;
</style>

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<body class="mo">
<div class=" ">
  <!-- Trigger the modal with a button -->
 <!--  <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button>
 -->
  <!-- Modal -->
  <div class="modal fade" id="myModal" role="dialog" data-backdrop="static" tabindex="-1">
    <div class="modal-dialog ">
    
      <!-- Modal content-->
      <div class="modal-content mo">
        <div class="modal-header">
         
          <h2 class="modal-title">Fillout this form </h4>
        </div>
        <div class="modal-body">
            <form action="" method="get">
        <label>Name</label>
         <input type="text" name="name" class="form-control" required/> 
        <label>Email</label>
         <input type="email" name="email" class="form-control" required/>
        <label>Mobile</label>
         <input type="text" name="mobile" class="form-control" pattern="[0-9]{10}" required/>
        <label>City</label>
       <select name="city" class="form-control" required/>
          <option value="Andhra Pradesh">Andhra Pradesh</option>
          <option value="Andaman and Nicobar Islands">Andaman and Nicobar Islands</option>
          <option value="Arunachal Pradesh">Arunachal Pradesh</option>
          <option value="Assam">Assam</option>
          <option value="Bihar">Bihar</option>
          <option value="Chandigarh">Chandigarh</option>
          <option value="Chhattisgarh">Chhattisgarh</option>
          <option value="Dadar and Nagar Haveli">Dadar and Nagar Haveli</option>
          <option value="Daman and Diu">Daman and Diu</option>
          <option value="Delhi">Delhi</option>
          <option value="Lakshadweep">Lakshadweep</option>
          <option value="Puducherry">Puducherry</option>
          <option value="Goa">Goa</option>
          <option value="Gujarat">Gujarat</option>
          <option value="Haryana">Haryana</option>
          <option value="Himachal Pradesh">Himachal Pradesh</option>
          <option value="Jammu and Kashmir">Jammu and Kashmir</option>
          <option value="Jharkhand">Jharkhand</option>
          <option value="Karnataka">Karnataka</option>
          <option value="Kerala">Kerala</option>
          <option value="Madhya Pradesh">Madhya Pradesh</option>
          <option value="Maharashtra">Maharashtra</option>
          <option value="Manipur">Manipur</option>
          <option value="Meghalaya">Meghalaya</option>
          <option value="Mizoram">Mizoram</option>
          <option value="Nagaland">Nagaland</option>
          <option value="Odisha">Odisha</option>
          <option value="Punjab">Punjab</option>
          <option value="Rajasthan">Rajasthan</option>
          <option value="Sikkim">Sikkim</option>
          <option value="Tamil Nadu">Tamil Nadu</option>
          <option value="Telangana">Telangana</option>
          <option value="Tripura">Tripura</option>
          <option value="Uttar Pradesh">Uttar Pradesh</option>
          <option value="Uttarakhand">Uttarakhand</option>
          <option value="West Bengal">West Bengal</option>
          </select>
          
          <label>Password</label>
         <input type="password" name="pass1" class="form-control" pattern="[0-9]{6}"  title='PLease Enter minimun 6 letters' required/>
         <label>Confirm Password</label>
         <input type="password" name="pass2" class="form-control" pattern="[0-9]{6}"  title='PLease Enter minimun 6 letters' required/>
 <div id="message">
  <h3>Password must contain the following:</h3>
  <p id="letter" class="invalid">A <b>lowercase</b> letter</p>
  <p id="capital" class="invalid">A <b>capital (uppercase)</b> letter</p>
  <p id="number" class="invalid">A <b>number</b></p>
  <p id="length" class="invalid">Minimum <b>8 characters</b></p>
</div>  
           <button type="submit" class="btn btn-info" name="submit">Submit</button>
        <!--   <h1 class="pr">You win &#8377;  </h1> -->
            </form>
        </div>
        <div class="modal-footer">
           <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>

        </div>
      </div>
      
    </div>
  </div>
  
</div>
</body>
<script>
  $(window).load(function()
{
    $('#myModal').modal('show');
});
</script>
