Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- /*
- CREATE TABLE 'users' (
- 'id' INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- 'n_user' VARCHAR(255) NOT NULL,
- 'n_email' VARCHAR(255) NOT NULL,
- 'n_password' VARCHAR(255) NOT NULL,
- 'n_city' VARCHAR(255) NOT NULL
- ) ENGINE=MYISAM;
- */
- //mysql_connect('localhost:8080','root','') or die ('error de connexion');
- //mysql_select_db('espacebts') or die('error');
- //
- $localhost ='localhost';
- $user ='root';
- $password ='';
- $db_name ='espacebts';
- //
- //
- $connect = mysqli_connect($localhost,$user,$password,$db_name);
- function s_users($n_user,$n_email,$n_password,$n_city){
- $n_password=md5($n_password);
- mysqli_query($connect,"INSERT INTO users(id,n_user,n_email,n_password,n_city)
- VALUES('','$n_user','$n_email','$n_password',' $n_city')");
- }
- ob_end_flush();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement