20 lines
358 B
PHP
20 lines
358 B
PHP
|
<?php
|
||
|
|
||
|
|
||
|
require './db_config.php';
|
||
|
|
||
|
$sql = "SELECT * FROM `exam`";
|
||
|
|
||
|
$result = $mysqli->query($sql);
|
||
|
if ($result != null) {
|
||
|
while ($row = $result->fetch_assoc()) {
|
||
|
$json[] = $row;
|
||
|
}
|
||
|
|
||
|
$data['exam'] = $json;
|
||
|
$result = mysqli_query($mysqli, $sql);
|
||
|
echo json_encode($data);
|
||
|
} else
|
||
|
echo "<br><br>keine Daten empfangen!<br><br>";
|
||
|
|
||
|
?>
|