bildungdb/api/user.php
2023-01-08 22:45:34 +01:00

21 lines
373 B
PHP

<?php
require './db_config.php';
$sql = 'SELECT login, password, email, created FROM user ';
$result = $mysqli->query($sql);
if ($result != null) {
while ($row = $result->fetch_assoc()) {
$json[] = $row;
}
$data['konto'] = $json;
$result = mysqli_query($mysqli, $sql);
echo json_encode($data);
} else
echo "keine Daten empfangen!";
?>