Create Web / PHP Project

This tutorial is about creating a Web / PHP project, This will be the first part to generate   PHP code and HTML Forms with Bootstrap framework to perform CURD operations (Create, Update, Read and Delete database table records) to database table or view.

This tutorial uses MariaDB database but you can accomplish the same task with other supported database management system (PostgreSQL, MySQL and SQLite).

  • Connect to database.

  • Define database table structure

  • Create the table using SQL Tool.

  • Create Project

 

1- Connect to database.

Hit connect button (first button in the toolbar), or use file menu to connect to database.

Sohag Builder connect to database

From the connection dialog choose MariaDB  from the database type list.

Add the database credentials  (you can use host and port default values by leaving them empty) and then press the Connect button to connect to the database.

sohag Builder mariadb connection to database

2- Define database table structure

The items table is constructed from 6 columns (item_id, item_name, cost, sales_price, uom and notes) to store basic items data.

Follow the steps bellow to create the item table using Sohag Builder SQL Tool.

Tip

Sohag Builder supports creating database table by wizard
Follow this tutorial to create a new table by wizard

  • Open a new SQL Tool.
  • Copy the item table create statement and paste it to the SQL Tool
  • Press Execute button to execute the code.
  • Press Commit button to save.

CREATE TABLE items (
	item_id	INTEGER PRIMARY KEY auto_increment,
	item_name	TEXT NOT NULL,
	cost	NUMERIC,
	sales_price	NUMERIC,
	uom	INTEGER,
	notes	TEXT
)

Sohag Builder Create PostgreSQL database table From SQL Tool

Now we need to reload the database info pane to display the newly created table.

  • Open the context menu from database info pane either by using right mouse button or from the keyboard context menu button.
  • From the menu press on Refresh.

sohag builder reload database metadata

Create a new PHP/Web Project.

  • Press on New Project button on the toolbar, alternatively select New Project from File menu.

Sohag Builder create a web php bootstrap curd application

  • Press Next to proceed to the next page.
  • From Project Type list select PHP Application.
  • Write items in the Project Name.
  • Set the project path, or leave the default location (documents). 
  • Press Finish to proceed with the class wizard.

Sohag Builder create a laravel or web php bootstrap curd application

  • In the new class wizard press Next to proceed.

Sohag Builder create a laravel or web php bootstrap curd application

  • Check items table (You may use Find Table box to filter tables if there are many tables in the database).
  • Press Next button.

Sohag Builder create a laravel or web php bootstrap curd application

This page allows us to specify which columns will be used and fields corresponding to the specified columns.

  • To use column check the column name.
  • To change the widget (field) label, double click the label and change it.

To change widget.

  • select the widget you want to change in the grid.
  • select the new widget from the Set Widget To list.
  • Press Set Widget button.

To select / deselect all columns.

  • Set Select all Columns checked / unchecked.

To set all HTML inputs (fields) to text type.

  • Set Select all html inputs to Text.

For this tutorial

  • Set Select all columns checked.
  • Uncheck item_id, since item_id is auto increment  and its value will be generated by MariaDB/MySQL database.
  • Press Next button to proceed.

Sohag Builder create a laravel or web php bootstrap curd application

  • In this page you can change the class name.
  • Press Finish button to proceed.
Tip

You can add more classes as you want, press New Class button and follow same steps to add a new class.

Sohag Builder create a laravel or web php bootstrap curd application

Here is the project summery

This page include all project data and class data.

  • Press Save button on the toolbar to save the project.

Sohag Builder create a laravel or web php bootstrap curd application

The next step is to use this project to generate PHP/Bootstrap CURD  files.

 

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.
7 + 13 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Verion
v1.0