a1/get.php

18 lines
306 B
PHP
Raw Permalink Normal View History

2024-05-21 08:06:02 +00:00
<?php
$dbhost = "qstack.pl";
$dbuser = "boost";
$dbpass = "pass";
$dbname = "db";
$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
$ans = mysqli_query($conn, "SELECT * FROM osoby");
$json = array();
while ($row = mysqli_fetch_assoc($ans)) {
$json[] = $row;
}
echo json_encode($json);
?>