I was going to write a tutorial, but it was too hard trying to explain OO concepts so I'm just going to release the script. Should be pretty secure. Also includes functions for validating an e-mail address and grabbing a user's IP address.
Any feedback/comments welcome, thanks.
I updated the script to include an install file and made a few other changes. File is too big to upload here so..
Haven't had a chance to really look over much of it, but it might be beneficial to include an sql export to setup the table/field(s). I am sure you will get a lot of beginners complaining that it doesn't work, when in fact they just never set the table/field(s) up.
Yea, a lot of beginners will stumble and fall when it comes to that. When giving script out to the public, if the script interacts with a database then the SQL should be included. If not, your mail inbox will be filling up pretty quickly!
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Hey all, I see there are alot of good things said about Daz login script. I am about to write/find one myself. Does this one have a session/cookie to remember the user, so they dont have to log in each time.? the initial post, has a vers 2 which is not avaialable right now. Is ver2 the one I want or will ver 1 be good. ? is ver 1 without the sql. ? any input? another script perhaps?
Eldonthian Leeburstroghm McAllister - Have a wonderful day. Its your choice!
Knowledge is the price for freedom www.1215.org "If you make yourselves sheep, the wolves will eat you." -- Benjamin Franklin
1st post on the site. I'm a PHP beginner well i've written a number of websites but never used OO before so was starting out and thought this login class looked pretty good. In any case I'm running PHP5, Apache2 and mySQL on Windows (my laptop) and when i try and run this seems the exception is caught and thrown out and all I ever get from the index page is:
getMessage(); } /* Include the HTML for the form */ require_once('./lib/form.php'); ?>
...as the error message. I'm hopelessly new to classes however i fully understand what the class is doing but how to debug it well i;m lost on that. I've done all the mysql set uyp work required. I know this is an old thread but any guidance even general would be much appreciated.
sketchMedia u are a saviour. The fact that it just completely wouldnt work when it had worked for so many others made me think i was going to have to change a setting in my php.ini file or apache config but never crossed my mind about that one. Its now working. Thanks for your help.