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.

198 Like 29 Dislike
Previous php-forum Next php-forum
Other php-forum

ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

order by date not ID number help php
I am trying to orginize the following code to order by date not id number.
any help would be grea

OOP help
okay so i have a class im making it has everything setup i just need to randomize the 2 variables an

php forms and database navigatio
Hello,
I'm new to php and i'd like to post the following.
I have written code to get records f

Running External Scripts
I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaW

What exactly is net neatrality?
What exactly is it? I think it's anti-censorship and... stuff... but I don't really understand it

MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an erro

Transform value 0 in no and 1 in yes help needed
Hello,
I have this in the table: "value" type int 0 to represent false and 1 to represe

Converting RGB values to HEX
Code: <?PHP

$file_handle = fopen("colors/rgb.csv", "r");

wh

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