Created
January 22, 2011 20:30
-
-
Save Alex-V/791445 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
mysql_connect('localhost:3306', 'mysql_user', 'mysql_pass'); | |
mysql_select_db('realmd'); | |
$username = strtoupper(mysql_real_escape_string($_GET['username'])); | |
$email = mysql_real_escape_string($_GET['email']); | |
$pass = strtoupper(mysql_real_escape_string($_GET['password'])); | |
$sha_pass = SHA1($username.':'.$pass); | |
$ip = $_SERVER['REMOTE_ADDR']; | |
mysql_query( | |
'INSERT INTO account (username,sha_pass_hash,email,last_ip,expansion) | |
VALUES ("'.$username.'", "'.$sha_pass.'", "'.$email.'", "'.$ip.'", 2)' | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment