-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit.php
More file actions
36 lines (31 loc) · 1.01 KB
/
edit.php
File metadata and controls
36 lines (31 loc) · 1.01 KB
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
<?php
include_once ("dbconn.php");
$period = $_POST['period'];
$subject_name = $_POST['subject_name'];
$teacher = $_POST['teacher'];
$s_time = $_POST['s_time'];
$e_time = $_POST['e_time'];
$query = "UPDATE routine SET Subject_name=:Subject_name, Teacher=:Teacher, Start_time=:Start_time, End_time=:End_time WHERE Period=:Period";
$stmt = $pdo->prepare($query);
$stmt->bindParam(':Subject_name', $subject_name);
$stmt->bindParam(':Teacher', $teacher);
$stmt->bindParam(':Start_time', $s_time);
$stmt->bindParam(':End_time', $e_time);
$stmt->bindParam(':Period', $period);
$stmt->execute();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0.5; url='./routine.php'">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Update</title>
<style>
</style>
</head>
<body>
<p>Entry updated successfully</p>
<p>You will be redirected to routine page</p>
</body>
</html>