Simple Crud in PHP and MySQL( Add, Edit, Delete, View in PHP and MySQL)

3
2418

We are going to learn how to add, edit, delete and view using the language PHP or in simple word we are going to learn CRUD in PHP. We will start first by preparing the tools that we need in building up this project. Anyway, our goal is to create a Simple Student Information System.

Software Requirements:

  • Notepad++/Dreamweaver for our IDE
  • XAMPP/WAMP for our Sever
  • Mozilla Firefox for our Output Platform
  • Bootstrap for our CSS Library

Files to be created:

• Header.php – This will be call in every template of the project to make it uniform and easy to update.
• Menu.php – This will be call in every template of the project as a navigation.
• Index.php –The home of the project.
• Connection.php – Where the connection to server and selecting of database happens. This will also call in every manipulation (add, edit, delete, and view in PHP) of our database.
• Create.php – the template for the create record.
• Read.php – the template for the read/view record.
• Update.php – the template for the update record.
• Delete.php – the template for the delete record.
• bootstrap.min.css – the CSS library. This will help us to design the project in an easy and fast way.
• deleteById.php – the code of deletion of record by ID took place.
• UpdateById.php – the code of update of record by ID took place.

To create the design of the project the templating done first.  In Header.php where the calling of CSS and putting of title:

After we finish the templating it is necessary that we must create the possible form in our CRUD in PHP.

CREATE FORM with the INSERT PHP CODE

Reading of record

Updating of record

Deleting of record

Thank you for reading this tutorial. To download the sample project just click the link below:

Download “Simple Crud in PHP and MySQL Sample Code” Simple_Student_Information_Download_CRUD_in_PHP_Sample_Code.zip – Downloaded 741 times – 29 KB

Happy Coding. 🙂

  • Hope this help you a lot. Cheers.

  • Fred Boulton

    Hi! Please rewrite for MYSQLi. I might find your scripts useful if I knew how to rewrite them. Maraming salamat, kuya.

    • Thank you for passing by in this article. I will create a version of mysqli as response to your request. Just wait for it. 🙂