Created
January 16, 2017 02:47
-
-
Save welding3000/7319fbd7ba6147480a9186f30e642fe0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<?php | |
$db_host = " files.000webhost.com "; | |
$db_nombre = " database "; | |
$db_usuario = " root "; | |
$db_contra = " "; | |
$conexion = mysqli_connect($db_host,$db_usuario,$db_contra); | |
if(mysqli_connect_errno()){ | |
echo " Error con la base de datos "; | |
exit(); | |
} | |
mysqli_select_db($conexion, $db_nombre) or die ("no se encuentra la BBDD"); | |
mysqli_set_charset($conexion,"utf8"); | |
$consulta = " SELECT * FROM `DATOSPERSONALES`"; | |
$resultados = mysqli_query($conexion, $consulta); | |
while($fila=mysqli_fetch_row($resultados)){ | |
echo $fila[0] . " "; | |
echo $fila[1] . " "; | |
echo $fila[2] . " "; | |
echo $fila[3] . " "; | |
echo "<br>"; | |
} | |
mysqli_close($conexion); | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment