okay, here is my code, which works fine on one page... but on a seperate seciton of the site seems to only display one item in the sublist.
its a rollover nav that can be found here :
relocate.youraddressmagazine.com
php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" media="all" type="text/css" href="flyout.css" />
<!--[if lte IE 6]>
<link rel="stylesheet" media="all" type="text/css" href="view/flyout_ie.css" />
<![endif]-->
</head>
<body>
<?php
// includes
include("conf.php");
// open database connection
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
// select database
mysql_select_db($db) or die ("Unable to select database!");
// generate and execute query
$query = "SELECT DISTINCT type FROM relocate ORDER BY type";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
// if records present
if (mysql_num_rows($result) > 0)
{
?>
<?php
// iterate through resultset
// print article titles
while($row = mysql_fetch_object($result))
{
?>
<div class="menu">
<ul>
<li><a href="";><? echo $row-> type; ?></a>
<ul>
<?
$query = "SELECT id, name FROM relocate WHERE type = '" . $row->type ."' ORDER BY name" ;
$result2 = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
if (mysql_num_rows($result) > 0)
{
while($row2 = mysql_fetch_object($result2))
{
?>
<li><a href="index.php?content=stores_fullview&id=<? echo $row2-> id; ?>"><? echo $row2-> name; ?></a></li>
<? } } ?> </ul>
</li>
</ul>
</div>
<? }
}
// if no records present
// display message
else
{
?>
Sorry, please check back later, we are experiencing some technical issues. Thanks.
Error Message : No records present.</font>
<?
}
// close database connection
mysql_close($connection);
?>
</body>
</html>
for some reason when you roll over 'austin facts' only one item is displayed instead of the three that exist.
it works fine for
shop.youraddressmagazine.comi'm not sure what the deal s