Advertisement
Guest User

Untitled

a guest
Jun 9th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. <?php
  2.     if(!empty($_POST))
  3.     {
  4.  
  5.         $host = "";
  6.         $user = "";
  7.         $pass = "";
  8.         $db = "";
  9.         $perms = "az"; //AZ I assume means all admin perms?
  10.        
  11.         mysql_connect($host,$user,$pass) or die(mysql_error());
  12.         mysql_select_db($db) or die(mysql_error());
  13.        
  14.         $user1 = $_POST['user1'];
  15.         $pass1 = $_POST['pass1'];
  16.        
  17.         if(!empty($user) && !empty($pass)){
  18.             mysql_query("INSERT INTO `accounts` VALUES ('','".$user1."','".$pass1."','','".$perms."',0,'0000-00-00 00:00:00','','',24,'enUS',0,NULL);") or die(mysql_error());
  19.             echo 'Account registered.<br /><br />';
  20.         }else{
  21.             echo 'Input a username and password.<br /><br />';
  22.         }      
  23.     }
  24.  
  25.     echo "<form action='reg.php' method='post'>
  26.             Username : <input type='text' name='user1' /><br />
  27.             Password : <input type='text' name='pass1' /><br />
  28.             <input type='submit' value='Submit' /></form>
  29.         ";
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement