Fill combobox with query
-
Hello,
I have a search form in Code manager to connect with a DataAccess table. Can I fill a combobox with query in the search form, like this?
<form method="get" action="https://www.miweb/reporte-usuarios/"> <label for="wpda_search_column_Usuario"> Usuario </label> <select id="wpda_search_column_Usuario" name="wpda_search_column_Usuario"> <?php $query = "SELECT * FROM users"; $result = mysql_query($query); while($row=mysql_fetch_assoc($result)){ echo ' <option value='.$row["user_id"].'>'.$row["user_login"].'</option> '; }?> </select> <br/><br/> <label for="wpda_search_column_Activo"> Estado de Usuarios </label> <select id="wpda_search_column_Activo" name="wpda_search_column_Activo"> <option value="1">Activos</option> <option value="0">Bajas</option> </select> <br/><br/> <input type="submit" /> </form> </center>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Fill combobox with query’ is closed to new replies.