Strange issue with OpenCart and select tag
Frecuentes
Visto 218 veces
0
I have a problem with an extension I am developing with OpenCart.
I have a select dropdown menu and I am want to use the selected function so that a certain option is selected. However the top entry is always being selected.
For example here is my code:
<select name="agent_status">
<option value="1" <?php if($status == '1') echo "selected"; ?>>Enabled</option>
<option value="0" <?php if($status == '0') echo "selected"; ?>>Disabled</option>
</select>
However the top option is always the default option even if I it should be the bottom option.
I can confirm that it is not a PHP error as I checked the source and the tag does end in selected. I have also tried using different browsers.
1 Respuestas
0
Mi error,
It came down to a caching problem!
Thanks for anyone who was about to answer
Respondido 24 ago 12, 00:08
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas php html html-select or haz tu propia pregunta.