-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransport.php
158 lines (145 loc) · 5.15 KB
/
transport.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?php
require_once __DIR__ . '/vendor/autoload.php';
$con= new MongoDB\Client("mongodb://localhost:27017");
$db=$con->studentmanagment;
$tb1=$db->student;
?>
<!DOCTYPE html>
<html>
<head>
<title>
Transport
</title>
<link rel="icon" type="image/x-icon" href="images/logo.png" sizes="32x32"/>
<style>
body{
font-family: Arial, Helvertica, sans-serif;
background-image: url("images/5.jpg");
}
h1{
text-align: center;
}
p{
text-align: center;
}
#registerbtn{
background-color: rgb(215, 240, 240);
color:black;
padding: 10px 10px;
margin: 13px;
cursor: pointer;
width:43%;
opacity: 0.9;
}
#registerbtn:hover{
opacity: 1;
}
.login{
float: left;
width: 40%;
}
#login{
text-align:left;
}
.right{
float: right;
}
.left{
float: left;
}
.mounika{
float: right;
width: 60%;
}
#homebut{
margin-left: 30px ;
background-color: rgb(45, 93, 155);
color: whitesmoke;
}
#logbtn{
margin-right: 30px;
background-color: rgb(45, 93, 155);
color: whitesmoke;
}
img{
margin-left:500px;
}
span{
font-size:35px;
font-weight:bold;
font-style:italic;
justify-content:center;
}
</style>
</head>
<body>
<img src="images/logo1.png" alt="logo" width="600" height="110">
<!-- <span>AM Institute of Technology</span> -->
<form>
<button type="submit" formaction="home.php" class="left" id="homebut" style="width: 100px;height: 35px;"><b><i>Home</i></b></button>
<button type="submit" formaction="loginpage.php" class="right" id="logbtn" style="width: 100px;height: 35px;"><b><i>Logout</i></b></button>
</form>
<br>
<br>
<hr>
<div class="login">
<div id="login">
<form>
<button type="submit" formaction="ADD.php" id="registerbtn">Insert Data</button>
<br>
<button type="submit" formaction="UPDATE.php" id="registerbtn">Update Data</button>
<br>
<button type="submit" formaction="attendence.php" id="registerbtn">Attendance</button>
<br>
<button type="submit" formaction="cgpa.php" id="registerbtn">CGPA</button>
<br>
<button type="submit" formaction="clubsnchapter.php" id="registerbtn">Clubs and Chapter</button>
<br>
<button type="submit" formaction="transport.php" id="registerbtn">Transport</button>
<br>
<button type="submit" formaction="hostel.php" id="registerbtn">Hosteller/Day Scholar</button>
<br>
<button type="submit" formaction="fees.php" id="registerbtn">Fees</button>
<br>
<button type="submit" formaction="Delete.php" id="registerbtn">Delete Data</button>
</form>
</div>
</div>
<div class="mounika">
<h4>Transport</h4>
<form action="#" method="POST">
<label>
Transport :
</label>
<select name="Transport">
<option value="">--Select the Transport mode--</option>
<option value="College Transport">College Transport</option>
<option value="Own Transport">Own Transport</option>
</select>
<br><br>
<input type="submit" name="submit" value="View" style="width: 80px; height: 30px; background-color: rgb(45, 93, 155); color: whitesmoke;"><br><br>
</form>
<?php
if(isset($_POST['submit']))
{
$Transport=$_POST["Transport"];
echo "<table border = '1'><th>RegNo</th><th>Name</th><th>".$Transport."</th>";
$count=0;
echo "<tr>";
$criteria = array("Transport"=> $Transport);
$data_info=$tb1->find($criteria);
foreach($data_info as $b)
{
$count++;
echo "<td>" .$b['RegNo']. "</td>";
echo "<td>" .$b['Name']. "</td>";
echo "<td>" .$b['Transport']. "</td>";
echo "</tr>";
}
}
?>
</form>
</div>
</body>
</head>
</html>