Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

46 total results found

Secure Password Storage with Password Hashing

PHP and MySQL Login Systems

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

PHP and MySQL Login Systems

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

PHP and MySQL Login Systems

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

PHP and MySQL Login Systems

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

PHP and MySQL Login Systems

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

PHP and MySQL Login Systems

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

PHP and MySQL Login Systems

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

PHP and MySQL Login Systems

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 ...

Backing Up a XAMPP Project

Developer Toolbox XAMPP Backup and Recovery

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...

Restoring a XAMPP Project from BackupNew Page

Developer Toolbox XAMPP Backup and Recovery

If a project is accidentally deleted, corrupted, moved to another computer, or you need to continue working from a backup, both the website files and database must be restored. This tutorial demonstrates how to restore a complete XAMPP project from a backup. B...

Moving a XAMPP Project to Another Computer

Developer Toolbox XAMPP Backup and Recovery

One of the advantages of using XAMPP is that projects can easily be moved between computers. This is useful when: Working between school and home. Upgrading to a new computer. Sharing a project with a teacher. Creating a backup before reinstalling Windows. A c...

New Page

Working with Data

Creating a Security Events Table

Working with Data Importing JSON into MySQL with PHP

In this tutorial, you will create a MySQL table to store security event data imported from a JSON file. The JSON file contains homes, devices and events. Rather than storing the entire JSON structure, each event will be stored as a separate row in a database t...

Importing JSON into MySQL with PHP

Working with Data Importing JSON into MySQL with PHP

In the previous tutorial, you created a security_events table. In this tutorial, you will read data from a JSON file and import it into MySQL using PHP. The JSON file contains devices and events. Each event will be inserted into the security_events table as ...

Querying Imported Data with SQL

Working with Data Importing JSON into MySQL with PHP

In the previous tutorial, you imported JSON data into the security_events table. In this tutorial, you will use SQL queries to analyse the imported data. View All Events Open phpMyAdmin and select the: security_events table. Run: SELECT * FROM security_events...

Building a Security Dashboard Using PHP and MySQL

Working with Data Importing JSON into MySQL with PHP

In the previous tutorial, you used SQL queries to analyse imported JSON data. In this tutorial, you will build a dashboard that displays security statistics directly from the database. The dashboard will display: Total Devices Total Events Critical Events High...

Loading JSON Data with JavaScript

Working with Data Working with JSON Data in JavaScript

In this tutorial, you will load data from a JSON file and display it on a webpage using JavaScript. The JSON file contains information about a smart home, including devices and security events. Create the Project Files Create a new folder called: json-demo Ins...

Displaying JSON Data in a Table

Working with Data Working with JSON Data in JavaScript

In the previous tutorial, you loaded a JSON file and displayed basic information about the smart home. In this tutorial, you will display the device data in an HTML table using JavaScript. Current Project Structure Your project should contain: json-demo ├── in...