Advanced Search
Search Results
114 total results found
Restoring a XAMPP Project from Backup
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
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
Importing JSON into MySQL with PHP
Create a MySQL structure, import fictional JSON records with PHP and query the stored data.
Creating a Security Events Table
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
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
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
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
Load, interpret and present nested fictional JSON data with JavaScript.
Loading JSON Data with 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
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
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
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
Create PHP JSON APIs and retrieve database records through focused endpoints.
Creating a Simple JSON API with PHP
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
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
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
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...