Untitled document
Hello, I am very new to php and my teacher has asked us to do a CRUD I have managed to show the records in the database. but, he has asked me to show them in a table and I have no idea how to do it, try to do it by entering html but given my low knowledge I could not. I hope you can help me I want to learn.
$registros = mysqli_query( $conexion, "select *
from datosfrutas where id='$_POST[datoBuscar]'" )or
die( "Problemas en el select:" . mysqli_error( $conexion ) );
if ( $reg = mysqli_fetch_array( $registros ) )
{
echo "<tr>";
echo "El nombre es:" . $reg[ 'Nombre' ] . "<br>";
echo "El Id es:" . $reg[ 'Id' ] . "<br>";
echo "¿Es endemica?:" . $reg[ 'Endemica' ] . "<br>";
echo "Pais de origen:" . $reg[ 'Pais' ] . "<br>";
echo "Es de color:" . $reg[ 'Color' ] . "<br>";
echo "Tiene sabor:" . $reg[ 'Sabor' ] . "<br>";
echo "Su consistencia es:" . $reg[ 'Consistencia' ] . "<br>";
echo "Su incidencia es:" . $reg[ 'Incidencia' ] . "<br>";
} else {
echo "No existe una fruta con ese Id.";
}
mysqli_close( $conexion );
?>