Display data retrived from a dropdown
<p>I need help. I want to display three data values that will be selected by a user from  3 dropdowns. 
I have created three dropdown lists in which a user will select 3 different options for each from the database then whatever the user will select must appear in a table. For example if user selects 111 for selection_id and 222 for fixture_id then Jesty for name it should appear as 
<strong>111 222 Jesty</strong> in a table.
For now I have only the drop downs that retrieve information from a data base then display dop downs.... Wat I need a way to display user selection, or javascript that will print to the user what he selected</p>

<p>Here is my 3 dropdown list </p>

<pre><code>require "config.php"; //Database connection
    $resource_selections = mysql_query("SELECT DISTINCT selection_id FROM selections ORDER BY selection_id ASC");
    $selections = array();
    while($row = mysql_fetch_row($resource_selections)){
        $selections[] = $row[0];    
    } 
    $resource_fixtures = mysql_query("SELECT DISTINCT fixture_id FROM selections ORDER BY selection_id ASC"); 
    $fixtures = array();
    while($row = mysql_fetch_row($resource_fixtures)){
        $fixtures[] = $row[0];
    } 
    $resource_names   = mysql_query("SELECT DISTINCT name FROM selections ORDER BY selection_id ASC");    
    $names = array();
    while($row = mysql_fetch_row($resource_names)){
        $names[] = $row[0];
    }
    if(count($selections) &lt;= 0 || count($fixtures) &lt;= 0 || count($names) &lt;= 0){
        echo 'No results have been found.';
    } else {

        // Display form
        echo '&lt;form name="form" method="post" action="selection.php"&gt;';

        //SelectionID dropdown:
        echo "&lt;select name='selection_id' id='selections' &gt;"; 
        foreach($selections as $selection) echo "&lt;option id='$selection'&gt;$selection&lt;/option&gt;";
        echo '&lt;/select&gt;';

        //FixtureID dropdown
        echo "&lt;select name='fixture_id' id='fixtures' &gt;"; 
        foreach($fixtures as $fixture) echo "&lt;option id='$fixture'&gt;$fixture&lt;/option&gt;";
        echo '&lt;/select&gt;';

        //Name dropdown
        echo "&lt;select name='name' id='names' &gt;"; 
        foreach($names as $name) echo "&lt;option id='$name'&gt;$name&lt;/option&gt;";
        echo '&lt;/select&gt;';

        echo "&lt;input type='submit' name='submit' value='Submit' /&gt;";




        echo '&lt;/form&gt;';



    }


    ?&gt;
</code></pre>
