User Guide
Thank you for purchasing from CodeShack!
Your support will help keep our website up and running, and will help us provide you with more quality content!
If you have any issues don't hesitate to contact us via our website or directly to our email at support@codeshack.io.
Requirements
I recommend you read the following tutorials on our website (if you haven't already):
- https://codeshack.io/secure-login-system-php-mysql/
- https://codeshack.io/secure-registration-system-php-mysql/
You will need the following:
- XAMPP or a web-server with PHP, MySQL & phpMyAdmin, if you've purchased web hosting you will need to upload the files to your web directory.
- A code editor, you can use notepad to edit the PHP files but I don't recommend it, instead download one of the following: Notepad++, Visual Studio Code, or Atom.
Instructions
- Open the XAMPP control panel and start Apache and MySQL
- Upload/import the "phplogin.sql" file in phpMyAdmin
NOTE: If you get a MySQL permissions error you might need to create the database manually. - Copy/cut one of the packages folder into your web directory (htdocs/www etc)
NOTE: If you purchased the advanced package and you're a beginner programmer I recommend you use the "advanced_pdo" package as it's easier to understand the code. - Rename the folder to "phplogin" and go to http://localhost/phplogin/ in your web browser
- Basic Package: Update the MySQL connection details in the PHP files.
Advanced Package: Edit the "config.php" and update the MySQL connection details, feel free to update the remaining variables in the configuration file. - Advanced Package: Navigate to http://localhost/phplogin/admin/ to access the admin panel or click the Admin link in the navigation bar, you can login to the admin panel with the username admin and password admin, if you DO NOT need the admin panel you can delete the "admin" directory.
- Enjoy coding and thank you for supporting us!
FAQs
- How do I add add-ons?
Each add-on contains an instructions file, follow the instructions to add them. - Why am I not receiving the activation email?
You need a working SMTP mail server and make sure your firewall is not blocking ports 25, 587, 465, 110, etc. This shouldn't be a problem on most hosting providers or Linux servers (built-in email server). - Why am I getting a MySQL error?
Make sure you edit the PHP files and update the connection details, you might need to change the hostname if yours is different, and make sure you've uploaded the SQL file in phpMyAdmin. - How do I download the zip file again if I've deleted it?
The download link is in your email, if you do not have it you can contact us and we can send you another email, remember not to share your download links, these are being monitored.
Updates
02/07/2020
- Added the Two-factor Authentication add-on.
29/05/2020
- Updated the AJAX code to work without jQuery, jQuery is no longer included.
- Added the "config.php" file, you can now use this file to update variables instead of updating different files.
- Added the "activation-email-template.html" file, the activation email will now be more appealing and no longer basic, feel free to customize this file.
- Added account roles and an Admin Panel, with the admin panel you can view accounts, create accounts, and change settings.
24/04/2020
- Updated the "remember me" feature, it will now work on multiple devices without being restricted to one device.
- Added "resend activation email" to the "Activation Required for Login" add-on, if the user has lost the email they can request a new one.
18/02/2020
- Updated the registration form and added "confirm password" feature.
- New add-ons added: Brute Force Protection, CSRF Protection.
03/01/2020
- Updated the activate page, there is now a user interface as before it was plain text.
- Updated all add-ons, added instructions on how to add them.
- Updated the user guide, the file is now in HTML format.
06/11/2019
- Added new add-on: Forgot Password - user will be able to enter their email and request a reset password link.
- Improved some code.
23/10/2019
- Improved the code for the advanced packages, you now only need to edit the connection details in the "main.php" file.
- Added extra params to the mail variables in "register-with-activation.php" to help with stopping mail going to spam.
- Renamed "index.html" to "index.php" and added code that will check if the user is already logged-in, if so they will be redirected to the home page.
- Added "Home" button to the home and profile pages in the top navigation bar.
15/09/2019
- Added responsive design to the advanced packages, the login system now works fine on mobile and tablet devices etc.
05/09/2019
- Added a few add-ons for the advanced PDO version (requested), to add them copy the file(s) from the add-ons directory and replace the ones in your "phplogin" directory.