I have to make a form with multiple drop-down menus that modify one another. The menus/database tables are:
Categories, Styles, Types, and Mechanisms
I have
Finally just had to figure it out on my own, but thanks for those who tried to help.
I will post my middle table from my Class/Category/Style/Type cascading tables. First make a function such as the below:
".$name.'';
}
} else {
$options.="";
}
return($options);
}
?>
Then place on your main page:
//Category
if(isset($_GET['category_id'])) {
$category_id=$_GET['category_id'];
setcookie('category_id',$category_id);
$link.="&category_id={$category_id}";
}elseif(isset($_COOKIE['category_id'])) {
$_GET['category_id']=$_COOKIE['category_id'];
$category_id=$_COOKIE['category_id'];
$link.="&category_id={$category_id}";
}
Now make your selection drop-down:
Repeat above for each required drop-down.
Good luck...and, of course use MYSQLi to protect your site rather than the MYSQL shown above...