-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathinsert_into_train_1.php
61 lines (40 loc) · 1.3 KB
/
insert_into_train_1.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
58
59
60
61
<html>
<body style=" background-image: url(adminlogin.jpeg);
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;">
<form action="insert_into_train_2.php" method="post">
Train Name: <input type="text" name="tname" required><br>
Starting Point: <select id="sp" name="sp" required>
<?php
require "db.php";
$cdquery="SELECT sname FROM station";
$cdresult=mysqli_query($conn,$cdquery);
echo " <option value = \"\" > </option>";
while ($cdrow=mysqli_fetch_array($cdresult))
{
$cdTitle=$cdrow['sname'];
echo " <option value = \"$cdTitle\" > $cdTitle </option>";
}
?>
</select><br>
Starting Time: <input type="time" name="st" required><br>
Destination Point: <select id="dp" name="dp" required>
<?php
require "db.php";
$cdquery="SELECT sname FROM station";
$cdresult=mysqli_query($conn,$cdquery);
echo " <option value = \"\" ></option>";
while ($cdrow=mysqli_fetch_array($cdresult))
{
$cdTitle=$cdrow['sname'];
echo " <option value = \"$cdTitle\" > $cdTitle </option>";
}
?>
</select><br>
Destination Time: <input type="time" name="dt" required><br>
Day of Arrival: <input type="text" name="dd" required><br>
<input type="submit">
</body>
</html>