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

114 total results found

Restoring a XAMPP Project from Backup

Developer Toolbox XAMPP Backup and Recovery

Restoring a XAMPP Project from Backup recreates both the website files and the MySQL database. Work from a copy of the backup so the original remains unchanged. Restore project files Install and test XAMPP. Stop Apache and MySQL before replacing project files....

Moving a XAMPP Project to Another Computer

Developer Toolbox XAMPP Backup and Recovery

Moving a XAMPP project requires a verified backup of both the project files and its database. Prepare the source computer Save all source files. Export the project database as SQL through phpMyAdmin. Copy the complete project folder from htdocs. Include the S...

New Page

Working with Data

Importing JSON into MySQL with PHP

Working with Data

Create a MySQL structure, import fictional JSON records with PHP and query the stored 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

This tutorial imports a fictional JSON dataset into MySQL using PHP, PDO, validation and a prepared statement. Use fictional data only. Do not import real student, staff, account, device or school-security information. Project files Create this structure insid...

Querying Imported Data with SQL

Working with Data Importing JSON into MySQL with PHP

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; This displays all imported records. Count All Events To find the total number of...

Building a Security Dashboard Using PHP and MySQL

Working with Data Importing JSON into MySQL with PHP

This standalone example queries fictional security-event data with PDO and presents useful summary and detail output. A dashboard is meaningful when each output answers a user question. Do not add a statistic or chart merely because it is easy to calculate. Co...

Working with JSON Data in JavaScript

Working with Data

Load, interpret and present nested fictional JSON data with JavaScript.

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 this tutorial, you will display the device data in an HTML table using JavaScript. Current Project Structure Your project should contain: json-demo ├── index.html ├── script.js └── smart_security_data.json Create a Table Container Open: index.html Update th...

Displaying Nested Event Data from JSON

Working with Data Working with JSON Data in JavaScript

In this tutorial, you will work with nested JSON data by displaying the security events associated with each device. The JSON file contains devices, and each device contains its own list of events. Understanding the JSON Structure The JSON file contains: Home ...

Creating a Security Dashboard from JSON Data

Working with Data Working with JSON Data in JavaScript

In this tutorial, you will create a simple dashboard that summarises the data and highlights important security information. The dashboard will display: Total Devices Total Events Critical Events High Severity Events Medium Severity Events Using the sample JSO...

Working with APIs

Working with Data

Create PHP JSON APIs and retrieve database records through focused endpoints.

Creating a Simple JSON API with PHP

Working with Data Working with APIs

In this tutorial, you will create a simple API using PHP. The API will return JSON data when visited in a browser. This is the same type of data format used by many real-world APIs. Project Structure Create a folder called: api-demo Inside the folder place: ap...

Reading API Data with JavaScript

Working with Data Working with APIs

The API returns JSON data when visited in a browser. In this tutorial, you will use JavaScript to read data from the API and display it on a webpage. Project Structure Your project should contain: api-demo ├── api.php ├── index.html └── smart_security_data.jso...

Creating a Database-Driven API with PHP and MySQL

Working with Data Working with APIs

This tutorial creates a read-only JSON endpoint using PHP, PDO and fictional database records. An API should return only the data needed for its stated purpose. Do not expose password hashes, session data, personal information or unnecessary database fields. C...

Creating API Endpoints for Specific Data

Working with Data Working with APIs

Focused endpoints return the smallest useful result for a particular user need. This tutorial adds filtered and summary endpoints using PDO and fictional records. Endpoint for one severity Create api/events-by-severity.php: <?php declare(strict_types=1); requ...