I was wondering if someone could give me a hand with something I'm trying to do....
I want to change This Page so that it will show up with two option boxes rather than one but at the same time having the option boxes connected so that if a catagory is slected in box one the that catagory's sub catagories will show up in box two and will change if the choice in box one is changed so that it will corraspond correctly...
this is the code that I've got for the page thus far
<select name="catid">
<?
$plus = "+";
$minus = "-";
$node = "o";
$result = mysql_query("SELECT * FROM dir_cats ORDER by holder ASC");
$list = @mysql_num_rows($result);
while ($i < $list) {
$row = mysql_fetch_array($result);
$id = $row["CatID"];
$name1 = $row["Name"];
$parent = $row["Parent"];
$level = $row["level"];
$holder = $row["holder"];
$isparent = $row["isparent"];
for ($a=1;$a <= $level;++$a) {
$spaces = ' ' . $spaces;
}
if ($isparent == '1') {
if ($parent == '0') {
print"<option value=\"$id\">$plus $plus $plus $name1</option>";
}
else {
print"<option value=\"$id\">$plus $plus $plus $name1</option>";
}
}
else {
if ($parent == '0') {
print"<option value=\"$id\">$node $node $name1</option>";
}
else {
print"<option value=\"$id\">$node $node $name1</option>";
}
}
$i++;
$spaces = '';
}
?>
and this is what I'm thinking I have to add... but the problem is that I don't know how to add it and still have it work properly.... (continued in next post)