I'ld like a basic user creation/user authentication PHP & MySQL solution. The solution will comprise a new user (creation) HTML form with username, password, verify password, email, name, surname fields. The associated PHP code that will check for the uniqness of the username in the database and it will either prompt the user for an alternate username or in the case that the username does not already exist in the database, the creation of the record (in table users with ID AUTO_INCRIMENT as the PK). Also the associated HTML form for ther login process i.e with field username & password and the PHP code for validation of these against the database. The PHP code should return an error message if the username and/or password the user provided is invalid (i.e. does not exist in the database) and it should create a unique sessionid (e.g. remote_ip_address+time+date+random number/string) and store it to the database in a table sessions which will reference the users table (i.e. the user can have one or more sessions) and also include the timestamp of the record .This session id should be stored as a cookie if cookies are enabled on the client or passed through the URL if cookies are [url removed, login to view] the PHP code that will verify the session id (either from the cookie or the URL parameter) against the database and against the IP address of the request (it should be the same as the one in the session id). If the session id does not exist or the ip's differ then the user should be asked to login again. Also it would be nice to have a cron job that will go and delete sessions that expired (i.e. are 12 hours old) say in hourly intervals. Any recomendations to a more robust and secure implementation is also [url removed, login to view] solution should be build using the session framework of PHP and the session id and password should be MD5 hashed. If the user closes the browser and then returns to a page that the validation of session occurs the user should be asked to re-enter their password.
2 HTML Forms Login and Create new User 3 PHP files #1 Creation of User and SessionID #2 Validation of User and Creation of Session ID #3 Validation of Session ID 1 Script for removing expired Sessions (e.g. cron job) 1 Script for Creation of Database tables Details for installation of files. Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
Linux PHP4 & MySQL