problem with adding filters

0

Good I am doing some tables where I must add some filters but nothing happens I do not know much about this topic I cope this code and it does not filter me

   <script>
$(document).ready(function(){
 $("#myInput").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#myTable tr").filter(function() {
  $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
    });
  });
});
</script> 

this is the page

<html>
<head>
<nav class="navbar navbar-default">
   <div class="container-fluid">
     <div class="navbar-header">
       <a class="navbar-brand" href="#">WebSiteName</a>
    </div>
   <ul class="nav navbar-nav">
     <li class="active"><a href="#">Home</a></li>
     <li><a href="#">PHP</a></li>
    <li><a href="#">ASP</a></li>
     <li><a href="#">JSP</a></li>
   </ul>
  </div>
 </nav>

  <title>Problema</title>
 </head>
 <body>
 <h1>Alta de Alumnos</h1>
 <form action="ejemplo2.php" method="post">
 Ingrese nombre:
<input type="text" name="nombre"><br>
Ingrese mail:
<input type="text" name="mail"><br>
Seleccione el curso:
 <select name="codigocurso">
 <option value="php">PHP</option>
 <option value="asp">ASP</option>
  <option value="jsp">JSP</option>
  </select>

  <br>
  <input type="submit" value="Registrar">
   </form>
   </body>
   </html>

this is for the connection:

  <html>
  <head>
  <title>Problema</title>
  </head>
  <body>
  <tbody id="myTable tr";
   <?php
   $conexion=mysqli_connect("localhost","root","","base1") or
die("Problemas con la conexión");

  mysqli_query($conexion,"insert into alumnos(nombre,mail,codigocurso) values 

   ('$_REQUEST[nombre]','$_REQUEST[mail]','$_REQUEST[codigocurso]')")
   or die("Problemas en el select".mysqli_error($conexion));

  mysqli_close($conexion);

  echo "El alumno fue dado de alta.";
 ?>
  </body>
 </html>

and this part does not stop that is xd                  issue              

  <?php
 $conexion=mysqli_connect("localhost","root","","base1") or
die("Problemas con la conexión");

 $registros=mysqli_query($conexion,"select nombre, mail, codigocurso
                    from alumnos") or
die("Problemas en el select:".mysqli_error($conexion));

   while ($reg=mysqli_fetch_array($registros))
 {
 echo "Nombre:".$reg['nombre']."<br>";
 echo "Mail:".$reg['mail']."<br>";
 echo "Curso:";
 switch ($reg['codigocurso']) {
case 1:echo "PHP";
       break;
case 2:echo "ASP";
       break;
case 3:echo "JSP";
       break;
   }
  echo "<br>";
  echo "<hr>";
 }

  mysqli_close($conexion);
 ?>

  </body>
   </html>
    
asked by wdwd 02.04.2018 в 21:09
source

0 answers