Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. <?php
  2.  
  3.     /*
  4.    
  5.         Author: Press
  6.         Site: Amicitia
  7.         Page: registerScript
  8.    
  9.     */
  10.    
  11.     /*      Connection and Database selection       */
  12.     $conn = mysql_connect("localhost", "root", "") or die(mysql_error());
  13.     $db = mysql_select_db("amicitia", $conn) or die(mysql_error());
  14.    
  15.     /*      Grabs the user's input and assigns it to a variable     */
  16.     $name = $_POST['uname'];
  17.     $pword = $_POST['pword'];
  18.    
  19.     $query = "INSERT INTO `accounts` ( `id` , `username` , `password` ) VALUES ( NULL ,  $name, md5($pword) )";
  20.     mysql_query($query) or die(mysql_error());
  21.        
  22.  
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement