-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit.php
57 lines (54 loc) · 2.08 KB
/
edit.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
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="others/style.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<title>Edit</title>
</head>
<body>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/bootstrap.min.js"></script>
<?
$id = $_GET['id'];
if (!isset($id)) die(' Определите id');
include('const.php');
$db_conn = new PDO('mysql:host=localhost;dbname=' . DB_CONNECTION_DB, DB_CONNECTION_USER, DB_CONNECTION_PASS);
$shedule = $db_conn->query('SELECT * FROM shedule WHERE id=' . $id);
$row = $shedule->fetch();
?>
<form action='edit_handler.php'>
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<td></td>
<td>Пн</td>
<td>Вт</td>
<td>Ср</td>
<td>Чт</td>
<td>Пт</td>
<td>Сб</td>
<td>Вс</td>
</tr>
</thead>
<tbody>
<tr>
<td><input name="id" hidden value='<?= $row['id'] ?>'></td>
<td><input name="time" placeholder=" время " value='<?= $row['time'] ?>'></td>
<td><input name="monday" placeholder=" Пн " value='<?= $row['monday'] ?>'></td>
<td><input name="tuesday" placeholder=" Вт " value='<?= $row['tuesday'] ?>'></td>
<td><input name="wednesday" placeholder=" Ср " value='<?= $row['wednesday'] ?>'></td>
<td><input name="thursday" placeholder=" Чт " value='<?= $row['thursday'] ?>'></td>
<td><input name="friday" placeholder=" Пт " value='<?= $row['friday'] ?>'></td>
<td><input name="saturday" placeholder=" Сб " value='<?= $row['saturday'] ?>'></td>
<td><input name="sunday" placeholder=" Нд " value='<?= $row['sunday'] ?>'></td>
</tr>
</tbody>
</table>
<input type='submit'><br>
<input type="reset"><br>
<form>
</body>
</html>