2022-02-01 09:00:34 +01:00
|
|
|
<?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));
|
|
|
|
}
|
|
|
|
|
2022-02-01 16:20:53 +01:00
|
|
|
$result = $con->query("select id_account, firstName, surName from accounts");
|
|
|
|
echo "<html>";
|
|
|
|
echo "<body>";
|
|
|
|
echo "<select name='id'>";
|
2022-02-01 09:00:34 +01:00
|
|
|
|
2022-02-01 16:20:53 +01:00
|
|
|
while ($row = $result->fetch_assoc()) {
|
2022-02-01 09:00:34 +01:00
|
|
|
|
2022-02-01 16:20:53 +01:00
|
|
|
unset($id_account, $firstName, $surName);
|
|
|
|
$id_account = $row['id_account'];
|
|
|
|
$firstName = $row['firstName'];
|
|
|
|
$surName = $row['surName'];
|
|
|
|
echo'<option value="'.$id_account.'">'.$firstName.' '.$surName.'</option>';
|
2022-02-01 09:00:34 +01:00
|
|
|
|
|
|
|
}
|
2022-02-01 16:20:53 +01:00
|
|
|
echo "</select>";
|
|
|
|
echo "</body>";
|
|
|
|
echo "</html>";
|
|
|
|
?>
|
2022-02-01 09:00:34 +01:00
|
|
|
|