-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlevel.php
More file actions
33 lines (29 loc) · 892 Bytes
/
Copy pathlevel.php
File metadata and controls
33 lines (29 loc) · 892 Bytes
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Уровень</title>
</head>
<body>
<ul>
<?php
$cells_count = $_POST['cells'];
$conn = mysqli_connect("127.0.0.1", "root", "72918316", "sudoku");
if (!$conn) {
echo "Не удалось установить соединение с базой данных";
exit;
} else {
$result = mysqli_query($conn, "SELECT * FROM tasks");
$rows = mysqli_num_rows($result);
for ($i = 1; $i <= $rows; $i++) {
echo "<li><a href='task.php?task=$i&cells=$cells_count'>Задание $i</a></li>";
}
}
mysqli_close($conn);
?>
</ul>
</body>
</html>