Installation Guide & Download for Display and Edit Record Scripts
Before installing the sample project
Treat the ZIP as a learning project rather than a drop-in production admin panel. Use a currently supported PHP 8.x release, configure PDO or MySQLi with exceptions enabled, keep credentials outside public source where practical, and test the project against a development database first.
Before exposing record editing publicly, add authentication, per-record authorization, CSRF protection, server-side validation and an audit trail appropriate to the application.
It is recommended to start with single column data edit and then move to all column data edit script.
There are two different tutorials explaining on the record edit. First one is editing single column of a record. Second one is editing all the columns of a record.
Here are the files
sql_dump.php : Use this SQL file to create student table. It has sample data which can be used. config.php : Enter your database login details like database name, user id, password & localhost. display.php : This is the main file which display the records and give the option to user to edit. This is the first file to be opened. display-ajax.php : The backend file which receives the data from display.php through Ajax and checks the data. It update the record in our student table and returns the data with message. ajax.js JavaScript file connected to display.php. Contains Ajax code to communicate between display.php and display-ajax.php file
Pre conditions to run this script.
Use a currently supported PHP 8.x release on your development or production server. ( How to check PHP version ? )
PDO enabled in your PHP installation and same can be checked by php info. How to Check PDO
OR MySQLi support to run the JQuery version of this script ( display-edit3 )
Use a MySQL-compatible database server and your preferred database administration tool to create/import the sample tables.
Running the script
After installation of tables and filling all database details in config.php file, try to open display.php file. If you are using single column data edit script then your URL at your browser address bar should be.
https://127.0.0.1/t/pdo/display-edit/display.php
In place of 127.0.0.1 you can use localhost if you are testing the script in your local computer. For the script with all columns edit option your URL should be like this ( with localhost )
https://localhost/t/pdo/display-edit2/display.php
For JQuery version with MySQLI support
https://localhost/t/pdo/display-edit3/display.php
Let us know if you have any suggestions to improve or facing any problem in installation.
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery,
and web development at plus2net. The tutorials focus on clear explanations, working
examples, and code that readers can test and adapt while learning.