Jump to content

Display MYSQL data into textboxes through drop down box PLEASE help ME!


newbiehacker

Recommended Posts

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.