<form name='userregisterform' method='POST' action='actionurl'>
<input type='text' name='username' value=''>
<input type='text' name='userpassword' value=''>
<input type='text' name='userpasswordagain' value=''>
<input type='text' name='usermail' value=''>
... other user fields inputs ....
<input type=submit' name='saveuser' value='SAVE USER'>
</form>
if(isset($_POST["saveuser"])){
$username=$_POST["username"];
$userpassword=$_POST["userpassword"];
$userpasswordagain=$_POST["userpasswordagain"];
$usermail=$_POST["usermail"];
$other user input values...
}
$salt = sha1($_POST['userpassword'], substr($_POST['userpassword'], 12));
$password = hash_hmac('sha256', $_POST['userpassword'], $salt);
$user_password=stripinput($_POST["user_password"]);
echo "Old Salt : ". $userdata["user_salt"]."<br>";
echo "Old Password : ". $userdata["user_password"]."<hr>";
$salt=sha1($user_password, substr($user_password, 12));
echo "New Salt : ".$salt."<br>";
echo "New Password : ".hash_hmac('sha256', $user_password, $salt);
Category Forum
Code Snippet and functions - 8Labels
None yet
Statistics
3 participants
Notifications
You are not receiving notifications from this thread.
Related Questions