Skip to main content

Recently Updated Pages

Validating CSV Rows

Working with Data Importing CSV into MySQL with PHP

Validate every row before storing it. if (count($row) !== 4) { $rowErrors[] = "Row $rowNumber...

Updated 2 months ago by Mr Napper

Reading CSV Rows with fgetcsv

Working with Data Importing CSV into MySQL with PHP

Use PHP’s CSV parser so quoted commas and escaped values are handled correctly. $handle = fopen($...

Updated 2 months ago by Mr Napper

Validating an Uploaded CSV File

Working with Data Importing CSV into MySQL with PHP

Validate the upload before reading its rows. $file = $_FILES["dataset"] ?? null; $errors = []; if...

Updated 2 months ago by Mr Napper

Creating an Admin-Only CSV Upload Form

Working with Data Importing CSV into MySQL with PHP

A CSV upload changes stored data and should be restricted to administrators. Apply session and ro...

Updated 2 months ago by Mr Napper

Designing a MySQL Table from a CSV

Working with Data Importing CSV into MySQL with PHP

Design the destination table from the meaning of the data, not merely its appearance in a spreads...

Updated 2 months ago by Mr Napper

Understanding CSV Data

Working with Data Importing CSV into MySQL with PHP

CSV means comma-separated values. Each line is a record and each position represents a field. mat...

Updated 2 months ago by Mr Napper

Protecting an Admin-Only Data Import Page

PHP and MySQL Login Systems

A role-based system must enforce permissions on the server. Hiding a link is helpful navigation, ...

Updated 2 months ago by Mr Napper

Updating Existing Records

PHP and MySQL PHP and MySQL Foundations

An update changes an existing row. The application must identify the row, validate changes and pr...

Updated 2 months ago by Mr Napper

Filtering and Sorting Records

PHP and MySQL PHP and MySQL Foundations

Filters help users reduce a dataset to relevant records. Sorts place those records in a useful or...

Updated 2 months ago by Mr Napper

Selecting and Displaying Records

PHP and MySQL PHP and MySQL Foundations

A useful output begins with a query and ends with accessible, escaped HTML. Select only required ...

Updated 2 months ago by Mr Napper

Inserting Validated Form Data

PHP and MySQL PHP and MySQL Foundations

An insert should accept input, validate it, store it with a prepared statement and report a usefu...

Updated 2 months ago by Mr Napper

Using Prepared Statements

PHP and MySQL PHP and MySQL Foundations

Prepared statements keep user-supplied values separate from SQL instructions. Use them whenever a...

Updated 2 months ago by Mr Napper

Connecting PHP to MySQL

PHP and MySQL PHP and MySQL Foundations

A database connection allows PHP to send SQL to MySQL and receive results. Keep the connection in...

Updated 2 months ago by Mr Napper

Checking a Project Before Development

Developer Toolbox XAMPP Setup and Projects

A short environment check prevents installation, folder and service problems from consuming devel...

Updated 2 months ago by Mr Napper

Creating a MySQL Database with phpMyAdmin

Developer Toolbox XAMPP Setup and Projects

A database organises persistent information in related tables. This practice creates a small fict...

Updated 2 months ago by Mr Napper

Creating Your First XAMPP PHP Project

Developer Toolbox XAMPP Setup and Projects

A XAMPP project belongs inside the htdocs folder so Apache can serve it and process PHP. Create ...

Updated 2 months ago by Mr Napper

Starting and Testing Apache and MySQL

Developer Toolbox XAMPP Setup and Projects

Apache runs PHP pages and MySQL stores application data. Both services must be running while you ...

Updated 2 months ago by Mr Napper

Task 4 - Cactus

Hosted Files

We will expand on the skills we learnt in the previous tasks to create a more complex mesh that h...

Updated 3 months ago by Mr Napper

2. Text as binary

Hosted Files

Understanding how text is stored in computers.dotx ASCII Values.xlsx Binary Simulator Teacher Edi...

Updated 3 months ago by Mr Napper

Welcome

About MrNapper.au

MrNapper.au provides classroom-tested learning resources, worked examples, tutorials and interact...

Updated 4 months ago by Mr Napper