Generate PHP Bootstap database CURD

This tutorial is about generating PHP Bootstrap CURD for database table or view.

Note

This tutorial requires following create web php project first

The last step of the previous tutorial of create web PHP project, was saving our project.

  • Press on the arrow in the generate list to open the list.
  • Select PHP/Web generator and hit it.

Sohag Builder create a laravel or web php bootstrap curd application

Sohag Builder will generate one directory and five files for each class to manipulate the database table data as the following.

items directory  containing the following files.

Sohag Builder create a laravel or web php bootstrap curd application

  1. index.php.
    This file contains code to view all table records in a bootstrap grid.
  2. add.php.
    This file contains HTML form and php code to insert a new record in the database table.
  3. edit.php.
    This file contains HTML form and php code to edit an existing  record in the database table.
  4. delete.php.
    This file contains php code to remove a record from database table.
  5. view.php.
    This file contains code to view a record details in a bootstrap grid.
Note

The generated code uses PDO prepared statement to prevent SQL injection.

File index.php

add.php

edit.php

view.php

delete.php

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
6 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Verion
v1.0