prueba3

[insert_php]

$servername = “localhost”;
$username = “hpdemo2”;
$password = “321654”;
$dbname = “demo_login2”;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}

$sql = “SELECT id, nombre, telefono, servicio FROM cliente”;
$result = $conn->query($sql);

if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo “id: ” . $row[“id”]. ” Name: ” . $row[“nombre”]. “TELEFONO ” . $row[“telefono”]. “SERVICIO ” . $row[“servicio”]. ”
“;
}
} else {
echo “0 results”;
}
$conn->close();

[/insert_php]