Advertisement
Guest User

Untitled

a guest
Nov 26th, 2016
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. <?php
  2. if($_POST){
  3.   $conn=mysqli_connect('http://127.0.0.1/openserver/phpmyadmin/index.php', 'root', 'root', 'noclip')
  4.   $username=$_POST['username'];
  5.   $email=$_POST['email'];
  6.   $password=md5(md5($_POST['password']));
  7.   $query="insert into users (username,email,password) values ('$username','$email','$password')";
  8.    if(mysqli_query($conn,$query))
  9.    {
  10.      echo $username. ', registered successfully!';
  11.    }
  12.    else()
  13.    {
  14.      echo 'Something went wrong';
  15.  
  16.    };
  17.    mysqli_close($conn);
  18. };
  19.  ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement