Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <?php
  2. ob_start();
  3. /*
  4. CREATE TABLE 'users' (
  5. 'id' INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  6. 'n_user' VARCHAR(255) NOT NULL,
  7. 'n_email' VARCHAR(255) NOT NULL,
  8. 'n_password' VARCHAR(255) NOT NULL,
  9. 'n_city' VARCHAR(255) NOT NULL
  10. ) ENGINE=MYISAM;
  11. */
  12. //mysql_connect('localhost:8080','root','') or die ('error de connexion');
  13. //mysql_select_db('espacebts') or die('error');
  14.  
  15. //
  16. $localhost ='localhost';
  17. $user ='root';
  18. $password ='';
  19. $db_name ='espacebts';
  20. //
  21. //
  22. $connect = mysqli_connect($localhost,$user,$password,$db_name);
  23. function s_users($n_user,$n_email,$n_password,$n_city){
  24.  
  25. $n_password=md5($n_password);
  26. mysqli_query($connect,"INSERT INTO users(id,n_user,n_email,n_password,n_city)
  27. VALUES('','$n_user','$n_email','$n_password',' $n_city')");
  28. }
  29.  
  30.  
  31. ob_end_flush();
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement