(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    Do you have a working sample of the loading bar with PHP/ MySQL?

Return to Recent Questions


Q: I need to work it with PHP/MySQL. I have found some information on it in your Support section, but have problems to understand and wonder if you have more information or a working sample of the loading bar with PHP/ MySQL.

A: Info about generating menu (menu items )from a database, please, see:

http://deluxe-menu.com/generate-menu-from-database-xml-php-asp-vb-support.html
Please, see the example of .php file.
The content of .php file depends on your database structure.


<?php

// The example for PHP/MySQL.
// MySQL database has the table "menuTable" that contains data for menu items.
// The table has the following fields:
// 1. "text" - item text
// 2. "link" - item link
// 3. "icon1" - item icon (normal state)
// 4. "icon2" - item icon (mouseover state)
function getMenuItems()
{
$jsItems = '';

// Select all records from table "menuTable"
$allItems = mysql_query('SELECT * FROM menuTable;');

// Extract items data from database and build Javascript code for menuItems
while ($itemData=mysql_fetch_array($allItems))
{
$jsItems .= '["'.$itemData['text'].'", "'.$itemData['link'].'", "'.$itemData['icon1'].'", "'.$itemData['icon2'].'"],';
}

// Return Javascript code
return $jsItems;
}

?>

<script>
var menuParam1 = value1;
var menuParam2 = value2;
var menuParam2 = value2;
...

var menuItems = [

<?php

// Write Javascript code for menu items
echo getMenuItems();

?>

];

</script>






Return to Recent Questions

Greatest 11 Free Wordpress Alternatives Tools How To Embed Instagram Feed  |  Effective Link in Bio Services  |  First-rate Responsive Website Builder Software - Beginner-Friendly Guide  |  Most Suitable 11 Best Wix Alternatives Website Creators  |  HTML Page Creator Plugins / Overview  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Best AI Website Builder | Free AI Website Builder | AI Website Maker | Free AI Website Generator | AI Website Generator