-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroute_places.php
46 lines (40 loc) · 1.27 KB
/
route_places.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
36
37
38
39
40
41
42
43
44
45
46
<?php
include('index.php');
include('db_connect.php');
// if (!isset($_POST["route_id"])){
// header('Location: '.$mainPageLink);
// die;
// }
echo "anime";
$route_id = $_POST["route_id"];
try {
$sql = "SELECT * FROM route_places WHERE route_id = :route_id";
$stmt = $conn->prepare($sql);
$stmt->bindValue(":route_id", $route_id);
$stmt->execute();
if(!$stmt->rowCount() > 0){
foreach ($stmt as $row) {
$place_id = $row["place_id"];
$route_id = $row["route_id"];
$type = $row["type"];
$created_at = $row["created_at"];
// гененировавть
// изменить
// удалить
// создать
echo "
<div>
<h3>Информация о пользователе</h3>
<p>Имя: $username</p>
<p>Возраст: $userage</p>
</div>";
}
}
else{
echo "Не найдены места в маршруте.";
}
}
catch (PDOException $e) {
echo "Database error: " . $e->getMessage();
};
?>