I figured it out. I was really really close, but I kept getting hung on the logistics of the web form.
The key was the following;
$z = "".$_POST['dept']."";
$y = "".$_POST['subdept']."";
$a = $name["".$z.""]["".$y.""] ;
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.