newbiehacker Posted August 1, 2006 Share Posted August 1, 2006 Hi Ill try to keep this short I have a drop down box that is fed by a mysql data base. the code is here. $sql = "select * from role"; $Pass = $db->query($sql); echo '<tr><td>Role:</td><td><select name="role"><option>Add Role</option>'; while($row = $Pass->fetchRow()){ $role = $row[0]; echo '<option value='.$role.'>'.$role.'</option>'; } echo '</select>';I need to fill a fill a form that has textboxes in which it grabs the value from the dropbox and fills the form with the values in this database here+-----------+------+--------+-----------+-------------+| extension | dnd | paging | fkey_0 | fkey_1 |+-----------+------+--------+-----------+-------------+| default | off | on | | || trial | off | on | dest *123 | dest *124 || test | on | on | *123 | *123 || test3 | off | on | dest *321 | dtmf ##1123 |+-----------+------+--------+-----------+-------------+Please help if you can I will be most gratefull Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted August 1, 2006 Share Posted August 1, 2006 what is in "role"? which column will it match in the other table? Quote Link to comment Share on other sites More sharing options...
newbiehacker Posted August 1, 2006 Author Share Posted August 1, 2006 sorry, the role is representing the extension field I need to grab whatever is in the dropdown box which is the extension field and populate the form with the other fields related to the extension field Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.