Hi there,
I have this little :rolleyes: 😃 bit of code underneath this, it basically retrieves the menu... but it appears the if statement doesn't work as I added part to the url and the $ variable is assigned but it still gives the second option. Is there anything obvious that could be fixed in this as to why it is chosing the second option when it should be the first?
$lmenu = mysql_query("SELECT name,link FROM menu WHERE menu='left' AND part='$part'")
or die(mysql_error());
While ($row = mysql_fetch_array($lmenu))
{
If($row['part'] != "")
{
echo '<tr><td><a href="';
echo $siteurl;
echo $row['link'];
echo '&part=';
echo $part;
echo '">';
echo $row['name'];
echo '</a></td></tr>';
}
else
{
echo '<tr><td><a href="';
echo $siteurl;
echo $row['link'];
echo '">';
echo $row['name'];
echo '</a></td></tr>';
}
}
mysql_free_result($lmenu);
Thanks,
Chris