Dynamic Menu AdminLTE And Dashboard Page – Tutorial Build Point Of Sale With PHP, PDO, MySQL And Jquery Part 2

After part 1 is complete the next step we will create dynamic menu and dashboard page on adminLTE.  Before I started this article, I make sure you have read Tutorial Build Point Of Sale With PHP, PDO, MySQL And Jquery Part 1 in order to follow this article well. The dashboard page will look like the following pictureTutorial Build Point Of Sale With PHP, PDO, MySQL And Jquery Part 1

In part 2 we will only edit the file index.php (pos/application/main/index.php), header.php (pos/application/layout/header.php) and pos.php (pos/application/model/pos.php)

I have discussed “how to create a dynamic menu on adminLTE” on some of my previous articles:

I will not discuss in more detail how to create this menu, you can read some of my articles above to understand more. To start making this menu, make sure you have created table m_user in part 1 article.

Then make 2 more tables on the MySQL database table r_menu and table r_sub_menu as follows

R Menu Table To Create Dynamic Menu Adminlte

R Sub Menu To Create Dynamic Menu Adminlte

In addition to the 2 tables above, please create a r_ref_system table to hold the main data of the application. r_ref_system table structure like the following picture:

R Ref System Table Structure How To Create Pos Php

Up to this point, we have succeeded in creating 4 tables in the pos database

4 Tables In Pos Database Mysql

Add some of the following queries to fill the table r_menu and r_submenu

And execute the following query to fill the table r_ref_system

Edit the header.php file (pos/application/layout/header.php) and fill in the following script:

Edit the index.php file (pos/application/main/index.php) and fill in the following script:

Edit the pos.php file (pos/application/model/pos.php) and add the following script:

To try the dynamic menu please change the value in a h_menu field in the m_user table. Change the menu to 1,2 or 1,3 and see the result.

Dashboard Page Point Of Sale Php Adminlte

If  you need complete project from this tutorial, you can download it from tutorial part 5 here.

I think the 2nd part tutorial is pretty easy so I do not need to explain in detail. Up here Tutorial Build Point Of Sale With PHP, PDO, MySQL And Jquery Part 2 has been completed, the next article will share how to create master user page in point of sale php.

The following two tabs change content below.
This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.

Leave a Comment

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.