Retrieve data for lleado and combobox and then capture the selected value to filter in another combobox

0
<select id="hola" class="nombreformato"  name="tablaformato">
          <option>Seleccione</option> 
         <?php  
            include ("conexion.php");
            if ($consulta2= $conexion->query("SELECT nombreformato 
                              FROM formato   "))
            {?>
            <?php
               while($row=mysqli_fetch_assoc($consulta2))
              {     

                foreach ($row as $key => $val1) 
                {?>

                <option onclick="myFunction()" value="<?php print($val1) ?>"><?php print($val1) ?></option>
                <br>
            <?php
                  } 
                }
            }
            ?>
            <br><br>
            </select>
                            <!--######CARRERA POR FORMATO EN PROCESO ####-->
                        <select class="nombrecarrera"  name="tablacarrera">
                        <option>Seleccione</option> 
                   <?php  
                            include ("conexion.php");
                            if ($consulta2= $conexion->query("SELECT nombrecarrera 
                                                              FROM carrera,formato "))
                            {?>
                            <?php
                                 while($row=mysqli_fetch_assoc($consulta2))
                                {     

                                    foreach ($row as $key => $val1) 
                                    {?>

                                    <option  value="<?php print($val1) ?>"><?php print($val1) ?></option>
                                    <br>
                            <?php
                                        } 
                                    }
                            }
                            ?>
                            </select>
    
asked by Eduardo Alfredo Busch Alvarez 01.06.2018 в 00:16
source

0 answers