-
Notifications
You must be signed in to change notification settings - Fork 3
/
mostrar.php
41 lines (29 loc) · 1005 Bytes
/
mostrar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
$busca="";
$busca=$_POST['buscar'];
$conect = mysqli_connect("localhost","root","Cuc41515","pokemons");// si haces conexion desde
// internnet usa 3 parametros si es a nivel local solo 2
//$conect = mysqli_select_db("");//nombre de la base de datos
if($busca!=""){
$busqueda=mysqli_query($conect, "SELECT * FROM personajes WHERE nombre LIKE '%".$busca."%'");//cambiar nombre de la tabla de busqueda
?>
<table width="1166" border="1" id="tab">
<tr>
<td width="19">Id </td>
<td width="61">Nombre: </td>
<td width="157">Tipo: </td>
<td width="221">Descripcion: </td>
</tr>
<?php
while($f=mysqli_fetch_array($busqueda)){
echo '<tr>';
echo '<td width="19">'.$f['id'].'</td>';
echo '<td width="61">'.$f['nombre'].'</td>';
echo '<td width="157">'.$f['tipo'].'</td>';
echo '<td width="221">'.$f['descripcion'].'</td>';
echo '</tr>';
//onclick="return confirm('¿Realmente deseas eliminar este articulo?')";
//cambiar los nombres de los campos de busqueda
}
}
?>