dziennik-backend/public_html/uwagi.php
2022-02-01 16:20:53 +01:00

27 lines
759 B
PHP

<?php header('Access-Control-Allow-Origin: *'); ?>
<?php
$con = mysqli_connect('mysql49.mydevil.net','m1344_dziennik','Julian2020!','m1344_dziennik');
if (!$con) {
die('Could not connect: ' . mysqli_error($con));
}
$result = $con->query("select id_account, firstName, surName from accounts");
echo "<html>";
echo "<body>";
echo "<select name='id'>";
while ($row = $result->fetch_assoc()) {
unset($id_account, $firstName, $surName);
$id_account = $row['id_account'];
$firstName = $row['firstName'];
$surName = $row['surName'];
echo'<option value="'.$id_account.'">'.$firstName.' '.$surName.'</option>';
}
echo "</select>";
echo "</body>";
echo "</html>";
?>