Creating a php program to compare video game characters
<pre><code>&lt;?php
$connect = mysqli_connect("localhost", "root", "jmpmvp", "characters");
if ($connect){
    echo "connected&lt;br&gt;";

}
$query = "SELECT * FROM `character`";
$result1 = mysqli_query($connect, $query);
?&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="UTF-8"&gt;
        &lt;title&gt;&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;form action ="handler.php" method="post"&gt;
            &lt;label for="character"&gt;SELECT A CHARACTER &lt;/label&gt;
        &lt;select multiple name="character"&gt;
            &lt;?php while($character = mysqli_fetch_assoc($result1)){?&gt;
            &lt;option value ="&lt;?php echo $character['id'];?&gt;"&lt;/option&gt;
             &lt;?php echo $character['name'];?&gt;&lt;/option&gt;
            &lt;?php }?&gt; 

        &lt;input type="submit" value="submit"/&gt;
        &lt;/select&gt;
        &lt;/form&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>this is my index page above</p>

<pre><code>&lt;?php
$connect = mysqli_connect("localhost", "root", "jmpmvp", "characters");
if ($connect){
    echo "connected&lt;br&gt;";

}
$query = "SELECT * FROM `character` where id = ". $_POST ["character"];
$result1 = mysqli_query($connect, $query);
?&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="UTF-8"&gt;
        &lt;title&gt;&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;



            &lt;?php while($character = mysqli_fetch_assoc($result1)){?&gt;

              &lt;?php echo $character["name"];?&gt;&lt;br&gt;;
             &lt;?php echo $character["attack"];?&gt;&lt;br&gt; ;
             &lt;?php echo $character["defense"];?&gt;&lt;br&gt;;
            &lt;?php } ?&gt;


    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>alright here is my handler page the issue I am  having is I can select multiple options in my html select on my index page but I am having a problem displaying when multiple characters are selected in my handler page.  Does anyone know how to fix this specific issue? I also want the data to displayed in a table which I'm pretty sure I can figure out.</p>