Hi, i'm having a problem with AES encryption.
I have 2 queries:
mysql_query("INSERT INTO table (secretfield) VALUES (AES_ENCRYPT('$secretvariable','12345'))")
mysql_query("SELECT AES_DECRYPT(secretfield,'12345') as sf FROM table WHERE ID='$_SESSION[id]'");
With AES_ENCRYPT it works fine, it inserts encrypted values into the column, but when i use AES_DECRYPT, it returns a blank value. No error, no nothing. Why are my fields not decrypting back?
Thanks