Cordial Greeting,
I hope you are well and can help me with what I want to do:
I have a Select, loaded from a database:
include'conexion.php ';
$sql = "EXEC SP_COMBO_PAGADURIAS";
$stmt = sqlsrv_prepare($conn, $sql);
if(sqlsrv_execute($stmt)){
$menu="<select name='menu' onchange='getComboC(this)' class='form-control' id ='menu'>\n<option selected>Seleccionar:</option>";
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC)){
$menu.="\n<option value='".$row['Campo1']."'>".utf8_encode($row['Nombre'])."</option>";
}
$menu.="\n</select>";
echo $menu;
}
Suppose what you loaded was:
<select> <option>Todos</option> <option>Prueba</option>
<option>No</option> </select>
Test has in the BD: Field1, Field2, Field3, Field4, Field5 Field1 = YES Field2 = NO Field3 = YES Etc ...
Then I have 5 inputs
<input type="text" disabled>
<input type="text" disabled>
<input type="text" disabled>
<input type="text" disabled>
<input type="text" disabled>