Hey buddy tutorial computer science previously discuss the creation of simple applications that CRUD in PHP & MySQL the first part. This time we will continue the tutorial yesterday, so I suggest you to read my previous article. In the last article we've managed to create a new database, table, database.php, create.php, and read.php. This time we will create two more php file which function to modify and delete the contents of the records in the table. Php file that we will create is update.php and delete.php.
Source code delete.php
$id=isset($_GET['id'])?$_GET['id']:die('ERROR:Record ID not found.');
$query="DELETE FROM products WHERE id=?";
die('Unable to delete record.');
After you finish creating the php file, then run this CRUD application by typing the following address in your browser. http: //localhost/bootstrap-3/read.php if no error will appear as follows.
If you click Edit, then it will look like the following
For those of you who still feel confused can see the video below, and if you want to download the complete source code from start to finish could through the link I provided below.