Advertisement
Guest User

Untitled

a guest
May 14th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2. $host="localhost";
  3. $user="root";
  4. $pass="";
  5. $db_name="szkola";
  6.  
  7. $connect=mysqli_connect($host,$user,$pass,$db_name);
  8. $name=$_POST['name'];
  9. $lastname=$_POST['lastname'];
  10. $address=$_POST['address'];
  11. $sex=$_POST['sex'];
  12. $phone=$_POST['phone'];
  13. if($connect)
  14. {
  15.  
  16.  
  17.  
  18.  
  19. $query="insert into nauczyciel(imie,nazwisko,adres,plec,telefon) values ('$name','$lastname','$address','$sex','$phone');";
  20. $check=mysqli_query($connect,$query);
  21.  
  22. }
  23.  
  24.  
  25.  
  26.  
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement