Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include "site/head.php"; ?>
- <?php
- mysql_connect($mysql_host, $mysql_user, $mysql_pass);
- mysql_select_db($mysql_logon);
- $username = $_POST['username'];
- $password =$_POST['password'];
- $password2 =$_POST['password2'];
- $email = $_POST['email'];
- if ($username==NULL | $password==NULL | $password2==NULL | $email==NULL){
- echo "Some empty field.";
- echo "Try again.";
- }
- else
- {}
- if ($password!=$password2) {
- echo "Pass not match";
- }
- else
- {}
- $qry_check_username = mysql_query("SELECT username FROM `account` WHERE username='$username'");
- function sha_password($user,$pass)
- {
- $user = strtoupper($user);
- $pass = strtoupper($pass);
- return SHA1($user.':'.$pass);
- }
- $password = sha_password($username,$_POST['password']);
- mysql_query("INSERT INTO account (username,sha_pass_hash,email) VALUES
- ('$username', '$password', '$email)");
- echo "Account created.";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement