
problema en mi codigo no se porque
Publicado por Any (5 intervenciones) el 13/10/2014 18:49:07
hola buenos dias tengo mi codigo de busquedas de php pero no me lanza resutados y no se por que alguien me podria decir cual es mi error o ayudarme por favor?
este es mi codigo de mi formulario :
mi codigo de mis resultados.php:
mi error me lo da en la linea del while
por favor necesito ayuda soy principiante de php y msqli o alguien que me pueda dar asesoria con mi codigo por favor se lo agradeceria infinitamente
este es mi codigo de mi formulario :
1
2
3
4
5
6
7
8
9
10
11
12
13
<html>
<body>
<form name="mi_formulario" id="mi_formulario" method="POST" action="resultados.php">
<input type="text" name="Num_serie" />
<input type="submit" value="Buscar" name="buscar" />
</form>
</body>
</html>
mi codigo de mis resultados.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
$conexion = new mysqli("localhost","root","","inventario");
if (mysqli_connect_errno())
{
echo "FALLO DE CONEXION MySQL: " . mysqli_connect_error();
}
mysqli_query($conexion,"SELEC * FORM limpio_salas ");
$sql="SELECT * FROM limpio_salas WHERE (origen = 'Almacen Limpio' AND Num_serie='".$_POST['Num_serie']."')";
$result = $conexion->query($sql); //usamos la conexion para dar un resultado a la variable
var_dump($result);
var_dump($conexion);
echo"<table class='tg'>";
echo"<tr>";
echo"<th width='100' class='tg-5392'>Num. Serie</th>";
echo"<th width='100' class='tg-5392'>Nombre del Equipo</th>";
echo"<th width='100' class='tg-5392'>Categoria</th>";
echo"<th width='100' class='tg-5392'>FIDI</th>";
echo"<th width='100' class='tg-5392'>Marca</th>";
echo"<th width='100' class='tg-5392'>Modelo</th>";
echo"<th width='100' class='tg-5392'>Propietario</th>";
echo"<th width='100' class='tg-5392'>Area y Responsables</th>";
echo"<th width='100' class='tg-5392'>Nombre y Num. de Proyecto</th>";
echo"<th width='100' class='tg-5392'>Fecha Ingreso</th>";
echo"<th width='50' class='tg-5392'>Periodo</th>";
echo"<th width='100' class='tg-5392'>obs. Ingreso</th>";
echo"<th width='50' class='tg-5392'>Estante</th>";
echo"<th width='50' class='tg-5392'>Posicion</th>";
echo"<th width='100' class='tg-5392'>Fecha Salida</th>";
echo"<th width='100' class='tg-5392'>Obs. Salida</th>";
echo"<tr>";
while ($fila = $result->fetch_array(MYSQLI_ASSOC))
{
echo "<td class='tg-ek65'>";
echo $fila ["serie"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["nom_equipo"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["categoria"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["fidi"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["marca"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["modelo"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["propietario"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["area"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["nom_proyecto"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["ingreso"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["periodo_dias"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["obs_ingreso"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["ubica_estante"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["ubica_posicion"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["salida"];
echo "</td>";
echo "<td class='tg-ek65'>";
echo $fila ["obs_salida"];
echo "</td>";
echo "</tr>";
}
echo"</table>";
?>
</html>
mi error me lo da en la linea del while
por favor necesito ayuda soy principiante de php y msqli o alguien que me pueda dar asesoria con mi codigo por favor se lo agradeceria infinitamente

Valora esta pregunta


0