-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
35 lines (33 loc) · 926 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Задание №3, п.2</title>
</head>
<body>
<?php
require_once 'connect.php';
$req = "SHOW TABLES";
$result = $connection->query($req);
$tables = $result->fetch_all(MYSQLI_NUM);
$connection->close();
?>
<form action="makefile.php" method="post">
Таблица, из которой будут выгружены данные:
<select name="table">
<?php
foreach ($tables as $table) {
echo '<option>'.$table[0].'</option>';
}
?>
</select>
Формат выгружаемых данных:
<select name="format">
<option>csv</option>
<option>json</option>
<option>xml</option>
</select>
<p><input type="submit" value="Выгрузить"></p>
</form>
</body>
</html>