Display drowdown values after user has selected 3 option
<p>I have 3 drop downs I want to display whatever the user will select after he/she has selected a function or a scrpt will do but it must be within the script </p>

<pre><code>&lt;?php
$resource_names = mysql_query("SELECT DISTINCT NAME FROM selections ORDER BY id ASC");
$names = array();
while($row = mysql_fetch_row($resource_names)){
    $names[] = $row[0]    
} 
$resource_surnames = mysql_query("SELECT DISTINCT SURNAME FROM selections ORDER BY id ASC"); 
$surnames = array();
while($row = mysql_fetch_row($resource_surnames)){
    $surnames[] = $row[0];
} 
$resource_emails   = mysql_query("SELECT DISTINCT EMAIL FROM selections ORDER BY id ASC");    
$emails = array();
while($row = mysql_fetch_row($resource_emails)){
    $emails[] = $row[0];
}
if(count($emails) &lt;= 0 || count($surnames) &lt;= 0 || count($emails) &lt;= 0){
    echo 'No results have been found.';
} else {

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

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

    //Surnames dropdown
    echo '&lt;select name="id" id="surnames"&gt;';
    foreach($surnames as $surname) echo "&lt;option id='$surname'&gt;$surname&lt;/option&gt;";
    echo '&lt;/select&gt;';

    //Emails dropdown
    echo '&lt;select name="id" id="emails"&gt;';
    foreach($emails as $email) echo "&lt;option id='$email'&gt;$email&lt;/option&gt;";
    echo '&lt;/select&gt;';

    echo "&lt;button id='write_in_div'&gt;Click me!&lt;/button&gt;";

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

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

<p>Something that will call the write_in_div When Click me! button is press or any other method that can be used to display 3 selection user selected</p>

<p>The Output should be something like You select 1) Name 2)Surname and Email</p>
