| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| SQLdumpster.com | Back to the sign in problem Encountered the MySQL problem again. My whole login form is screwed and I cannot cope with it anymore. Help is apreciated very much. PHP Code: That's my whole sign in verification script. Obviously a form gets posted to this script with two text fields 'username' and 'password'. I cannot login. Or when I can, it lets me log in with any password. It's very screwed up but this is my last resort. If you guys cannot help me, I'm packing the whole thing in....Thanks |
| |
| | #3 (permalink) |
| SQLdumpster.com | Well, it displays : PHP Code: |
| |
| | #4 (permalink) |
| NPQ's PA, Slave, and On Call Coder Technical Services | Kinda in a rush but I think this will work.. ![]() PHP Code:
__________________ Last edited by SecondVersion; 09-12-2005 at 03:22 PM. |
| |
| | #6 (permalink) |
| NamePros Regular | Again, I think you forgot the mysql_query when you defined $query. Try changing this: PHP Code: PHP Code:
__________________ The mass purge has begun. |
| |
| | #9 (permalink) |
| SQLdumpster.com | That would be brilliant. I'm just trying to fixup an FTP account which is proving difficult
__________________ !!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!! Free Databases for your Website | All Things Playstation 3 Website Design Books | Music While You Work? | Computer Gadgets |
| |
| | #10 (permalink) |
| NamePros Regular | After playing around with it, the problem lies here (I should have seen this in the beginning): PHP Code: the md5 function takes a string as a parameter. You have passed it a parameter, but you have enclosed it in single quotes. When you enclose a variable in single quotes, the variable is NOT interpolated. All you have to do is change the single quotes to double quotes and it works (which I did in your script). So in essence what was happening is that the md5() function was performing its duty on the string '$passwordbeforemd5' ALL THE TIME, and NOT what the user had entered in the password form field. This led to the SAME $password variable EVERY time. You will need to reset the password for the specified user to whatever you want it to be, then all should work. PM / reply if you have additional questions. -Bob
__________________ The mass purge has begun. Last edited by moondog; 09-15-2005 at 09:16 AM. |
| |
| | #11 (permalink) |
| SQLdumpster.com | woAh. I cannot thank you enough! Reputation boosted! NP $'s Donated (bit tight though, sorry)!
__________________ !!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!! Free Databases for your Website | All Things Playstation 3 Website Design Books | Music While You Work? | Computer Gadgets |
| |
| | #12 (permalink) | |
| NamePros Regular | Quote:
Happy coding. -Bob
__________________ The mass purge has begun. | |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Back Button problem after log out HELP! | 3rulzs | Programming | 2 | 05-17-2004 06:55 AM |
| Howto: Protect your site from BACK BUTTON TRAPS | Mp)Tarh | Webmaster Tutorials | 0 | 08-10-2003 12:13 PM |