i am using php-mysql for a project in which i am storing
passwords in table in encrypted form.
Code:
$sql_insert = mysql_query("INSERT INTO userinfo(full_name,id,pass,email,address,contact)
VALUES
('$full_name','$uid',SHA2(CONCAT('$pass1','$uid'),1024),'$email','$address','$contact')");
m usind sh2() function here for encryption.My problem occurs when i try to use this function in a place thats not an sql query like:
Code:
$en_entered_pass=SHA2(CONCAT('$password','$username'),512);
Here i am trying to use this encryption and store the value in another variable but is shows error that function not recognized.why? is it not supported by php itself? if so, is there no way to store the encrypted password in some temporary variable??