Jump to content

password encryption not work after post


brooksh

Recommended Posts

If I set my password in the script it works, but if I submit the password in a form it doesn't. When echoing the password, both show the same thing. The login_pass2 encrypts correctly, but the login_pass does not. I've also tried doing $login_pass = "$_POST[login_password]"; but it doesn't work. Can anyone figure out why this isn't working?

 

$login_pass = $_POST['login_password']; //posted = pass1234
$login_pass2 = "pass1234";
echo "$login_pass and $login_pass2";// shows pass1234 and pass1234
$encrypted_pass = data_encrypt($login_pass,$key);
$encrypted_pass2 = data_encrypt($login_pass2,$key);
echo "$encrypted_pass and $encrypted_pass2"; // shows 9lf8xG573pp+8DkhzK/Bu7GPFQQzg40mZZEGIF9Qg7c= and
Ex20uB9BVZgqOqjjEu5hDXN+JQu0b4qPn15CXsKOlls=

Link to comment
https://forums.phpfreaks.com/topic/274329-password-encryption-not-work-after-post/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.