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

PHP page is blank
Hi Everyone,

I have a site in which I am able to open the first PHP webpage in my browser but

The IE or FF detector
Hello Friends,

Problem of today ( we seek for php help ) as following ,

we know all th

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

Fetching array then reversing it
Hi, I have a simple problem, I'll try to explain it as best I can:
News entries in my database ar

Loosing changed contents when used FM REUSE_ALV_GRID_DISPLAY
Hi,

I have used FM REUSE_ALV_GRID_DISPLAY in my program as below.

CALL FUNCT

Encrypt php code?
Is it possible to encrypt php code in files,
so that it displays a load of unreadable characters

values not being entered into table
hi. I;ve created a form, so that when a user enters data into it, it gets added to a table in a data

All possible combinations of Strings from table in PL/SQL
Hi,

I am trying to figure out how to build a list of all possible string combinations fro

Search in the PHP Files
have to search asterisk(*) in the php code of the php files .
In the html page one text box

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