Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.