Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <?php
  2.  
  3. $conn=mysqli_connect("dbserver", "okasoyturk" , "okan", "okasoyturk");
  4. error_reporting(E_ALL);
  5. ini_set('display_errors', 1);
  6.  
  7. $nom = $_POST["nom"];
  8. $prenom = $_POST["prenom"];
  9. $tel = $_POST["tel"];
  10. $email = $_POST["email"];
  11. $random = rand (0, 20000);
  12.  
  13. $statement = mysqli_prepare($conn, "INSERT INTO users (Nom, Prenom, TelPerso, NombreAleatoire, Email) values (?, ?, ?, ?, ?)")
  14. or die(mysqli_error($conn));
  15. mysqli_stmt_bind_param($statement, "sssis", $nom, $prenom, $tel, $random, $email);
  16. mysqli_stmt_execute($statement);
  17.  
  18. mysqli_stmt_close($statement);
  19. mysqli_close($conn);
  20.  
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement