Guideline for creating menu bars with HTML and PHP

Asked By 20 points N/A Posted on -
qa-featured

Hello, experts! Actually, I am new in PHP learning. I am wanting to create dynamic website associate with HTML and PHP. Basically, I want to make menu bars with HTML and PHP. Please help me by showing guideline. Thanks a lot.

SHARE
Best Answer by Joseph K Carpenter
Best Answer
Best Answer
Answered By 50 points N/A #172711

Guideline for creating menu bars with HTML and PHP

qa-featured

Hi,

Making dynamic html menu bars with database binding is very easy to create using PHP as the server side programming language. These are mostly used in order to change the web site appearance based on the logged in users role. Below is a simple example.

$query = “query to retrieve menu name and link page name based on user role ”;

$result = mysql_query($query);

echo “<table>”;

while($row = mysql_fetch_array($result)){

$menuname = $row[‘column name from table’];

$menunamelink = $row[‘linkpage from table’];

echo “<tr> <td><a href = ‘$menunamelink’>$menuname</a> </td></tr>;

}

Hope this guideline will help you.

Answered By 45 points N/A #172712

Guideline for creating menu bars with HTML and PHP

qa-featured

Hello there Jonathon,

If you want to make cool menu bars in your webpage then make it using CSS and import it to your PHP page since CSS is the most helpful way to make your menu bars look awesome.

If you are having a hard time in making CSS menu bar then look on this tutorials. You can easily view first tutorial CSS Navigation Bar and an another CSS3 Menu Bar Example – CSS Navigation .

Hope this helps you.

Regards, Roland.

Related Questions