Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2. include_once ("connection.php");
  3. if($_SERVER['REQUEST_METHOD'] == 'POST') {
  4.     $reg_username = $_POST['reg_username'];
  5.     $reg_password = $_POST['reg_password'];
  6.     $reg_username = stripslashes($reg_username);
  7.     $reg_password = stripslashes($reg_password);
  8.     $reg_password = md5($reg_password);
  9.     $reg_admin_query = "INSERT INTO admin (`username`,`password`)
  10.                        VALUES ('$reg_username','$reg_password')";
  11.     if (!mysql_query($reg_admin_query, $connection)) {
  12.         echo mysql_error();
  13.     }
  14.     mysql_close();
  15.     echo "New admin registered";
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement