Trouble verifying database password


Posted on 16th Feb 2014 07:03 pm by admin

Thankyou to everyone who responded to my last post (I can't find the posting, it has been buried).

I am currently making a login form and the associated php code. It all seems to work apart from the part below. I am constantly being told in the output error 'The password you entered is not correct' . When I register a user, my registration code adds the password to the database in an md5 encrypted state. I think it has something to do with that and have tried looking up md5 encryption but still don't understand why I am not able to verify my password entered on the login page with the one registered in the database.

Did you know?Explore Trending and Topic pages for more stories like this.
Quote//Verify password entered matches stored password md5?
$loginname = mysql_real_escape_string($_POST['loginname']);
$pwd = md5($_POST['loginpwd']);
$verify = mysql_query("SELECT loginpwd FROM members WHERE loginname = '$loginname' ");
if ($verify != $pwd)
{die('The password you entered is not correct');}
Thanks in advance.
No comments posted yet

Your Answer:

Login to answer
198 Like 29 Dislike
Previous forums Next forums
Other forums

Help: calling function
Hi,
Is it possible to call a php function on page close?
If yes, could you explain how and whe

problem in program for counting no of chars using pointers
Hi all, I was trying to make a program which counts number of chars in a string using concpt of poin

Writing Windows Device Drivers with C
Yes: one of the nice features of C is void*. You can put anything there and get anything out. Very

insert mysql embeded videos as blobs?
Using TinyMCE my client will be able to embed images and flash videos into large columns of text whi

login page does not execute a else statement
I've created a login page using sessions.
When an incorrect user name or password is entered then

MS Exchange 2007 integration with ECC 6.0
Hello Experts,
We have ECC 6.0 and MS Exchange 2007. We need to integrate ECC 6 and MS Excha

Displaying data from database into a 2 dimensional table
Good day!

I'm a beginner in PHP and I'm not expecting a full coding for this qestion. I'm jus

Upload file and add HTML
Hey everyone,

I have a client has meeting agendas and minutes that should be posted online. I

finding key position of specified value in multi-dimensional array
Code: $openedfile = fopen($tfc_file4, "r");
$rc = 1;
while(!feof($openedfile))
{<

Count
Getting the same count everytime

Code:
$visitquery = mysql_query("SELECT COUNT(*) FR

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash