-   Programming (
-   -   php sha2() function (

mscoder 11-30-2012 06:27 AM

php sha2() function
i am using php-mysql for a project in which i am storing
passwords in table in encrypted form.

$sql_insert = mysql_query("INSERT INTO      userinfo(full_name,id,pass,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:

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??

graemef 12-01-2012 06:33 AM

At a guess CONCAT is a SQL function and so you want something like:

$en_entered_pass=SHA2($password + $username,512);

All times are GMT -5. The time now is 04:58 AM.