Advanced Search
Search Results
67 total results found
Programming Tutorials
Practical programming tutorials and examples.
PHP and MySQL
Tutorials covering PHP, MySQL and web application development.
New Page
Login Systems
Creating a User Database and Table Using SQL
Many PHP applications require a user table to store login information. In this tutorial, you will create a database, create a users table, and add your first user account using SQL statements in phpMyAdmin. Open phpMyAdmin Open phpMyAdmin in your browser. Exam...
New Page
Secure Password Storage with Password Hashing
In the previous tutorial, passwords were stored as plain text in the database. In this tutorial, you will update your project to store passwords securely using PHP password hashing. Why Hash Passwords? When passwords are stored as plain text, anyone with acces...
Creating a User Registration Form
In the previous tutorial, you created a users table and learned how to securely store passwords using password hashing. In this tutorial, you will create a registration form that allows new users to create an account and store their details in the database. Cr...
Creating a Login Form
In the previous tutorial, you created a registration form that stores users in the database. In this tutorial, you will create a login form that checks a username and password against the database and allows a user to log in. Create the Login Page Create a new...
Using PHP Sessions to Keep Users Logged In
In the previous tutorial, you created a login form that verified usernames and passwords. In this tutorial, you will use PHP sessions to remember who is logged in and keep them signed in while they navigate your website. What is a Session? A session allows PHP...
Protecting Pages and Preventing Unauthorised Access
In the previous tutorial, you used PHP sessions to remember who was logged in. In this tutorial, you will prevent users from accessing protected pages unless they have successfully logged in. The Problem Currently, anyone can access: http://localhost/members.p...
Creating a Logout Page
In the previous tutorial, you protected pages so that only logged-in users could access them. In this tutorial, you will create a logout page that destroys the user's session and returns them to the login page. Why Do We Need Logout? When a user logs in, their...
Adding Role-Based Access Control
In the previous tutorials, users could register, log in, access protected pages and log out. In this tutorial, you will add roles to your user accounts and restrict access to pages based on those roles. The system will support three roles: admin teacher studen...
Creating a Navigation Menu Based on User Roles
In the previous tutorial, you created a role-based access control system using admin, teacher and student accounts. In this tutorial, you will build a navigation menu that changes depending on the role of the logged-in user. This allows different users to see ...
Working with Data
Developer Toolbox
XAMPP Backup and Recovery
Backing Up a XAMPP Project
A XAMPP project usually consists of two parts: The website files stored in the htdocs folder. The MySQL database storing the application's data. To create a complete backup, both parts must be saved. Create a Backup Folder Create a folder somewhere safe, such...