I’m trying to create a breadcrumb script and so far I have
[php]
if(isset($id)) { $id = $id; } else { $id = 1; }
mysql_select_db($database_connection, $connection);
$query_destination = “SELECT * FROM destinations WHERE parent = ‘$id’”;
$destination = mysql_query($query_destination, $connection) or die(mysql_error());
$row_destination = mysql_fetch_assoc($destination);
$totalRows_destination = mysql_num_rows($destination);
$par=$row_destination[‘parent’];
mysql_select_db($database_connection, $connection);
$query_parent = “SELECT * FROM destinations WHERE id=’$par’”;
$parent = mysql_query($query_parent, $connection) or die(mysql_error());
$row_parent = mysql_fetch_assoc($parent);
$totalRows_parent = mysql_num_rows($parent);
?>
<?php echo $row_parent['name']; ?>
<?php do { ?> <?php } while ($row_destination = mysql_fetch_assoc($destination)); ?>[/php]
This is working ok but when you click in a link n the repeat its reloading the page and just changing the name in
to the parent, as its coded to do.
What i want to do is put the parents parent next to this if its possible.