I have this while
to show me some records of the database when I click a button but before that it appears that I have an error.
Code:
<?php
$conexion = mysqli_connect("localhost", "root", "","henkel");
$consulta ="SELECT DISTINCT* FROM lote where Etapa=11 order by HoraFinal DESC limit 50";
$consulta2 ="SELECT DISTINCT * FROM lote where Etapa = 1 and Equipo = 2 ORDER BY HoraInicio DESC limit 20";
if ($conexion -> connect_errno){
die("Fallo la conexion:(".$conexion -> mysqli_connect_errno().")".$conexion-> mysqli_connect_error());
}
if(ISSET($_POST['btnActualizar'])){
$resconexion= mysqli_query($conexion,$consulta);
}
?>
<!doctype html>
<html lang="es">
<form action ="Reportes.php" method ="post">
<head>
<title>Lotes</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h2>Lotes terminados </h2>
<table>
<?php
while($cont1=mysqli_fetch_array($resconexion)) //////linea 70 ////////
echo
'<tr>'.
'<th>'.$cont1['Lote'].'</th>'.
'<th>'.$cont1['IDH'].'</th>'.
'<th>'.$cont1['NumOrden'].'</th>'.
'<th>'.$cont1['Operador'].'</th>'.
'<th>'.$cont1['Equipo'].'</th>'.
'<th>'.$cont1['Etapa'].'</th>'.
'<th>'.$cont1['HoraFinal'].'</th>'.
'</tr>';
?>
</table>