Unanswered: Using PHP and mySQL to populate listbox
My experience with PHP until this point was with "PHP only" scripts (no HTML included in code). I've now built my page in Dreamweaver so my form looks pretty, but I guess pretty doesn't mean much if I don't know how to make it work. So, I think I need someone's help.
I have 2 questions regarding PHP's interaction with forms.
On my page I have 3 radio buttons (first,after,last)
Next to the "after" radio button I have a drop-down listbox (after_list)
Maybe my first question doesn't involve PHP but how do I go about making the "after" radio button select the "after_list" listbox?
My second question regards embeding PHP into HTML. How would I write the PHP code into my Dreamweaver HTML to querry the mySQL server and populate the listbox with a columns' information?
If you're using it more than one location then build a function and just call the function in your page.
$dbConn = new MyConnect();
$sql = "SELECT recipe_id, menu_name FROM menu_item ORDER BY menu_name";
$rs = mysql_query($sql, $dbConn->conn)or die("Connection to DataBase failed");