<?php
require('../logica/conexion.php');
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Comunidad</title>
<link rel="stylesheet" type="text/css" href="../css/estilos.css">
<script src="../Jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../js/script.js"> </script>
</head>
<body>
<h1>Editar</h1>
<?php
$db = new conexion();
error_reporting(E_ERROR | E_WARNING |E_PARSE);
$mensaje=$_GET["mensaje"];
$result=$db->query($mensaje);
if ( $info_campo = mysqli_fetch_fields($result)) {
$col=mysqli_num_fields($result);
$num=$col-1; ?>
<center>
<?php
$table ="<table id=\"tab\" border=\"1px solid #000\" width=\"600\">";
$table .="<tr>";
foreach ($info_campo as $valor) {
$table .= "<th>".$valor->name."</th>";
}
$table .= "</tr>";
$a=0;
while ($fila=mysqli_fetch_row($result)) {
$table .="<tr aling=\"center\">";
for ($i=0; $i <=$num; $i++) {
$table .= "<td>".$fila[$i]."</td>";
}
$a++;
$table .= "</tr>";
}
$table .="</table>";
echo $table;
}
?>
</body>
</html>