Hey All,
Hope some can help.
I'm trying to do that bread crumb thing with this function:
Function BreadCrumbs($bread)
{
static $bread;
$_SESSION[cat_name] = $_GET[cat_name];
$cat_name = $_SESSION[cat_name];
$cat_id = $_GET[cat_id];
$sql = "SELECT cat_id, cat_name, parent_id FROM category where parent_id = $cat_id ORDER BY cat_id";
$result = @mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result);
$parent_id = $row['parent_id'];
$bread = $row->cat_name .">".$bread;
$bread .= " $row[cat_name] ";
return $bread;
}
Now lets say I have a category called Autos and under that Auto Parts and then under that Brakes.
Which if i clicked all the way down to Brakes should display this: Auto > Auto Parts > Brakes.
But all I seem to get displayed is > Auto Parts > when I click Auto Parts then > Brakes > when I click Brakes.
I hope you can understand what I wrote here
What I am missing?
This is all done on the same page BTW.
Thank you very much for any help.
troinfo.