Sticky select box with while loop
<p>I can't seem to get this right. I am trying to make a select box that gets it values from the database sticky please see my code below :</p>

<pre><code>&lt;select name="cob_bank"&gt;
   &lt;?php while($row = mysqli_fetch_array($query,MYSQLI_ASSOC)){ 
        if($row['Id']==$myId)  {
            echo '&lt;option value="'.$row['Id'].'"selected="selected"&gt;'.$row['Name'].'&lt;/option&gt;';
        } else {
            echo '&lt;option value="'.$row['Id'].'"&gt;'.$row['Name'].'&lt;/option&gt;';
        }
    }?&gt;
&lt;/select&gt;
</code></pre>

<p>after the select box is filled in and the submit button is pressed where I save my Post variable</p>

<pre><code>$myId = $_POST['cob_name'];
</code></pre>

<p>The above code does not work I please assist</p>