Closed Thread
Results 1 to 2 of 2

Thread: PGSQL select from problem

  1. #1
    happy is offline Newbie
    Join Date
    May 2009
    Posts
    25
    Rep Power
    0

    PGSQL select from problem

    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?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Parabola's Avatar
    Parabola is offline Programming Professional
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    336
    Blog Entries
    4
    Rep Power
    13

    Re: PGSQL select from problem

    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.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to select data of a select list from database table
    By justsachin4u in forum PHP Development
    Replies: 26
    Last Post: 07-10-2011, 12:34 AM
  2. How to Select data of a select list from database???
    By justsachin4u in forum PHP Development
    Replies: 0
    Last Post: 06-25-2011, 04:58 AM
  3. How to Select data of a select list from database???
    By justsachin4u in forum PHP Development
    Replies: 0
    Last Post: 06-25-2011, 04:49 AM
  4. Replies: 4
    Last Post: 08-31-2010, 12:50 PM
  5. puzzling error in pgsql / php
    By happy in forum PHP Development
    Replies: 5
    Last Post: 07-21-2009, 07:23 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts