Hi
so ive been having trouble with my php login form. ive had it where the user enters username and password. and its not been working. Whats supposed to happen is the php counts the number of rows where the username matched the username enetered and the password matched the password enetered. If the count = 1. then the script will progress and the user is logged in. Its not been working. After looking deeper into the problem ive found out why. the problem is in the PGsql.
the username and password are stored as varchars. if i do this....
select * from users where username = 'joebloggs';
it will bring up that row
now lets say joebloggs enetered newbie as his password
id type
select * from users where password = 'newbie';
and i get nothing.
if the data is inputted directly into the pgsql via putty it would bring up the row. the PHP is correct and the data is being inserted. every column is able to retrieve rows apart from the password cloumn.
any ideas?
I'm not completely sure how the password is being input into the database, but I know many forms which store passwords to databases do not store them as is, but encrypt them. Anyway we could see the result set for an entire row, all fields? Use a dummy account of course lol.
Programmer (n): An organism that can turn caffeine into code.
Programming would be so much easier without all the users.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks