#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0

    Member registration DB/users can't log in


    The problem: I have some php pages that make up a simple user registration, login, member area, and logout. Newly registered users are added to the database successfully but they can not log in.

    The details: I have been following a pretty basic guide located here: knowledgesutra.com/discuss/tlddl-php-simple-login-tutorial-learn-simple-login.html
    The php that has been taken from that site has not been modified in any way, so I will not clutter this thread with the code -- it can be viewed by using the link above. You'll need to put an "http" for that link to work (yep I'm dancing around the rules... this may be my first post but I have to give out some URLs here in order to fully describe the problem.)

    If the script can not match up the login details to the database, the it echos Sorry, could not log you in. Wrong login information. This is what is happening to me now.

    I already checked for the obvious... The values in my config.php are correct and it is establishing a connection to the database. The user name, password and email I registered with to test it can be seen in the database, and I am using those exact values to attempt to log in. I deleted and remade the table twice.

    I took two screen shots of the MySQL database for ease in solving this problem:

    s1205.photobucket.com/albums/bb423/kevinfell1/?action=view&current=entries.png

    s1205.photobucket.com/albums/bb423/kevinfell1/?action=view&current=entries.png
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0
    If you're still having problems viewing those links I tried to post just let me know and I'll come up with a way to provide you the relevant information we're gonna need to solve this.

    Not letting new comers to the forum post URLS is not very newbie friendly.
  4. #3
  5. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,244
    Rep Power
    4279
    Originally Posted by Goshinki
    Not letting new comers to the forum post URLS is not very newbie friendly.
    yeah, but smart newbies will find a way

    remember, your average spammer isn't very smart at all
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    I suggest finding a different tutorial, I glanced over the code at saw at least two serious and obvious security vulnerabilities in it. To be honest, it's not really worth debugging that one when there are much better tutorials available elsewhere. The fact that that tutorial shows up as the second result when you Google "PHP login tutorial" is sort of a tragic reflection on the average quality of PHP developers.

    The first Google result has one of those same vulnerabilities in it too...

    ... and so does the 6th one.

    OK, screw that, I will write you a tutorial.

    This thread can be moved to the PHP forum.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by E-Oreo
    I suggest finding a different tutorial, I glanced over the code at saw at least two serious and obvious security vulnerabilities in it. To be honest, it's not really worth debugging that one when there are much better tutorials available elsewhere. The fact that that tutorial shows up as the second result when you Google "PHP login tutorial" is sort of a tragic reflection on the average quality of PHP developers.

    The first Google result has one of those same vulnerabilities in it too...

    ... and so does the 6th one.

    OK, screw that, I will write you a tutorial.

    This thread can be moved to the PHP forum.
    That'd be awesome... it's totally needed to. To be honest I thought the guide wasn't the best possible solution to what I'm trying to do but I searched for a long time before even finding a decent, simple one.
  10. #6
  11. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo