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.

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

how make 2 column in table with data tybe long row
hi every one

I want make in my table 2 column with data tybe long raw

how thi

Something like an INI editor or a DelimitedText-Editor
Hi all,

Am very, very, very new to PHP and not sure if I should be posting this to a Javascri

Last Weeks sDate and eDate.
sDate - Start Date
eDate - End Date

I need to pull two dates for "Last Week" whi

help with email script...
hey

I need help with my mail script

when the form on http://www.mcgdesignstudio.com/c

Please help - should be a simple fix.. driving me nuts
Everything seemed to be working fine. I have a table, it alphabetically lists a bunch of cities and

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as

creating a 1 to 100 in a table
hi guys I am a newb in php need some help.

I have a table with 1 column and 100 rows and in

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

Problem with coding MySQL query
I'm having heaps of trouble getting one of my PHP/MySQL queries to work for some reason (and the fun

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