fersan 0 Newbie Poster

My problem, I have a grid that shows me all the data in a database and at the end of row I have a combo that I want to change I changed the database, but the problem is that although the row 5 and choose option 3 always updates the data combo with the combo of row 1. And row 1 works perfectly with all the options Combo,

 <select id="cboEstados" name="cboEstados" class="comboMedio" onChange="cambiar_estado(<?php echo mysql_result($res_resultado,$contador,"id")?>)">

                                <? if ($marcaestadomercancia == 1) { ?>

                        <option value="1" selected="selected">Castelldefels</option>
                                <? } elseif ($marcaestadomercancia==2) { ?>
                                <option value="2" selected="selected">China</option>
                                <? } elseif ($marcaestadomercancia==3) { ?>
                                <option value="3" selected="selected">Vilafranca</option>
                                <? } elseif ($marcaestadomercancia==4) { ?>
                                <option value="4" selected="selected">Otros</option>
                                <? } ?>                        
                                <option value="1">Castelldefels</option>
                                <option value="2">China</option>
                                <option value="3">Vilafranca</option>
                                <option value="4">Otros</option>



                                </select></div></td>

http://www.rebarato.es/tienda/images/fotos/pantallazo.png

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.