Question ... scraching ... need help
| From: | Dan McCullough | Date: | Tue, 06 Nov 2001 13:54:30 +0000 |
| Subject: | Question ... scraching ... need help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73596@lists.php.net to get a copy of this message | ||
I am doing something wrong. I have been starring at this for hours, and its not helping.
Can I have someone stare at this for a few mintues and tell me what I am doing wrong.
Here is my desired output:
products : category
Selection1
Selection2
Selection3
Selection4
Selection5
Selection6
Here is what I get:
products : category
Selection2
Selection3
Selection4
Selection5
Selection6
If I comment out the breadcrumb section of code:
Selection1
Selection2
Selection3
Selection4
Selection5
Selection6
Here is the code:
$id;
$sql = "SELECT * FROM collections WHERE parent_id = $id ORDER BY sort_order ASC";
$result = mysql_query($sql);
$subcategory = mysql_fetch_array($result);
$par_id = $subcategory["parent_id"];
$sql2 = "SELECT * FROM categories WHERE id = $par_id";
$result2 = mysql_query($sql2);
$breadcrumb = mysql_fetch_array($result2);
?>
<html>
<head>
<title>Test Template</title>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0"
rightmargin="0" bottommargin="0">
<?
echo("<font face=\"Arial,Helvetica,Geneva,Swiss,SunSans-Regular\"><a
href=test.php>products</a> :
".strtolower ($breadcrumb["cat_nam
e"])."</font><br><br>");
if ($subcategory[collection_id] >= 0) {
echo("<font face=\"Arial,Helvetica,Geneva,Swiss,SunSans-Regular\"><a
href=test3.php?id=".$subcategory["collection_id"].">".$subcateg
ory["collection_name"]."</font></a><br><br>");
}
?>
</body>
</html>
any help?
=====
Dan McCullough
-------------------------------------------------------------------
"Theres no such thing as a problem unless the servers are on fire!"
h: 603.444.9808
w: McCullough Family
w: At Work
__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com