Advertisement
Guest User

registration.php

a guest
May 3rd, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. <?php
  2.     require "init.php";
  3.    
  4.     $name = $_POST["Name"];
  5.     $email = $_POST["Email"];
  6.     $phone = $_POST["Phone"];
  7.     $age = $_POST["Age"];
  8.     $password = $_POST["Pass"];
  9.    
  10.     $sql_query_for_check_existing_user = "select * from patientinfo where Phone like '$phone';";
  11.     $result = mysqli_query($con,$sql_query_for_check_existing_user);
  12.    
  13.  
  14.     if(mysqli_num_rows($result)>0)
  15.     {
  16.         echo "This Phone ".$phone." Number Already Exist...";  
  17.     }
  18.     else
  19.     {
  20.         $sql_query = "insert into patientinfo values('$name','$email','$phone','$age','$password');";
  21.         mysqli_query($con,$sql_query);
  22.     }
  23.     mysqli_close($con);
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement