Login form allows anyone...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
WithHisStripes
Forum Contributor
Posts: 131
Joined: Tue Sep 13, 2005 7:48 pm

Login form allows anyone...

Post by WithHisStripes »

Heya,
So I wrote a simple login form but for some reason it's allowing users who don't exist to login... I don't even know how that's possible but I need to fix that. Can someone help?

Code: Select all

 
if ($row->client-password != $client_password) {
 
I think that code is what's not working. I just need to have the form data check against the database to see if the record exists. So if the password is "1" and the username is "2" then it should find "2" and see if the password from the form is "1".

Does that make sense? Thanks!
Last edited by Benjamin on Mon May 18, 2009 3:48 pm, edited 1 time in total.
Reason: Changed code type from text to php.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Login form allows anyone...

Post by Benjamin »

Can you post the login code please.
Post Reply