-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patha.php
More file actions
43 lines (37 loc) · 838 Bytes
/
Copy patha.php
File metadata and controls
43 lines (37 loc) · 838 Bytes
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
<html>
<head>
</head>
<?php
if(isset($_POST['submit']))
{
include "db.php";
$a=trim($_POST["arrivaltime"]);
$b=trim($_POST["platformno"]);
$c=trim($_POST["trainno"]);
$res="select * from trainform where trainno='$c'";
$res1=$conn->query($res);
if($res1->num_rows==1)
{
$x="select * from platform where arrivaltime='$a' and platformno='$b'";
$y=$conn->query($x);
if($y->num_rows==1)
{
echo "<script type='text/javascript'>alert('platform is already assigned');</script>";
include "assignment.php";
}
else
{
include "assign.php";
}
}
else{
echo "<script type='text/javascript'>alert('no such train has been entered');</script>";
include "assignment.php";
}
}
else
echo "<script type='text/javascript'>window.top.location.href='unauthorised.php';</script>";
?>
<body>
</body>
</html>