Hello, I am supernew at php.
I understand Javascript, some intermediate Java, expert html, css, Actionscript.
Please advise as to the issue below.

My company has acquired a php-based Web site.
It has a button in the global main navigation header that we need to remove.
Here is the following script that the php page header.inc pulls to populate the global navigation header:

$navigation = @mysql_query("SELECT * FROM navigation WHERE category='main' ORDER BY listing ASC");

Which is then placed into a table by this code:

<table border="0" align="center" cellpadding="0" cellspacing="0">
	<tr> 
	  <td><img src="/_images/nav_divider_white.gif"></td>
	  
	  <?php while ($nav = @mysql_fetch_array($navigation)) { ?>
	  <td class="<?php
	  
	  	if ($mainNav == "kb") {
			$mainNav2 = "support";
		} elseif ($mainNav == "markets") {
			$mainNav2 = "home";
		} else {
			$mainNav2 = $mainNav;
		}

		if ($mainNav2 == strtolower($nav['title'])){
			echo "nav_main_on";
		} else {
			echo "nav_main";
		}
	  ?>"><a href="<?= $nav['url']; ?>"><?= $nav['title']; ?></a></td>
	  
	  <td><img src="/_images/nav_divider_white.gif"></td>
	  <?php } ?>
	</tr>
</table>

I need to remove a button named "company"
I updated the table code as follows:

<table border="0" align="center" cellpadding="0" cellspacing="0">
	<tr> 
	  <td><img src="/_images/nav_divider_white.gif"></td>
	  
	  <?php while ($nav = @mysql_fetch_array($navigation)) { 
              if ($mainNav == "company") {
              continue;
              }
          ?>

... remaining original code, etc. ...

Instead of removing the button from the navigation bar, it removes the navigation bar from the page "company" which I thought was interesting but not the achievement I wanted. :)

Thank you in advance!

Try:

<table border="0" align="center" cellpadding="0" cellspacing="0">
	<tr> 
	  <td><img src="/_images/nav_divider_white.gif"></td>
	  
	  <?php while ($nav = @mysql_fetch_assoc($navigation)) { 
              if ($nav['fieldname'] == "company") {
              continue;
              }
          ?>

... remaining original code, etc. ...

...Replacing with the name of the mysql fieldname that company is located. Also, I can't see where $mainnav and $mainnav2 are coming from

This worked!
Thank you so much!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.