Strange issue with OpenCart and select tag

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>

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.

preguntado el 24 de agosto de 12 a las 00:08

1 Respuestas

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 or haz tu propia pregunta.