-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshowdetails.php
More file actions
123 lines (115 loc) · 2.51 KB
/
Copy pathshowdetails.php
File metadata and controls
123 lines (115 loc) · 2.51 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
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
<html>
<head>
<style type="text/css">
label{
color: blue;
margin: solid black 3px;
padding : 5px;
}
footer{clear:both;
text-align:center;
padding:20px;
background:url('emoji.jpg');
margin:10px;
margin-top:12%;
margin-left:45%;
margin-right:45%;
border:2px dashed green;}
input[type=date] {
padding: 8px 20px;
margin: 8px ;
margin-bottom:10px;
margin-left:50px;
border: 2px solid lightblue;
border-radius: 2px;}
input[type=password]{
width: 25%;
padding: 8px 20px;
margin: 8px 0;
margin-left:50px;
border: 2px solid red;
border-radius: 2px;
}
input[type=number]{
width: 25%;
padding: 8px 20px;
margin: 8px 0;
margin-left:65px;
border: 2px solid green;
border-radius: 2px;
}
input[type=email] {
width: 25%;
padding: 8px 20px;
margin: 8px 0;
margin-left:56px;
border: 2px solid blue;
border-radius: 2px;
}
input[type=text] {
width: 25%;
padding: 8px 20px;
margin: 8px 0;
border: 2px solid yellow;
border-radius: 2px;
margin-left:45px;
margin-right:50%;
}
h2{color:yellow;
border:2px dashed yellow;
margin:10px;
padding:5px;
background:url('emoji.jpg')}
input:focus {border: 3px solid #555;}
body{background:url('emoji.jpg');
color:red;
font-family:100px bold;}
</style>
</head>
<body>
<?php
if($_POST){
$a=$_POST['userid'];
echo "<font style='font-size:100%;color:white'>";
$conn=mysqli_connect("localhost","root","");
if($conn->error==NULL)
{}
else
echo "connection failed";
$sql="use delhimetro;";
$conn->query($sql);
echo "</font>";
}
?>
<font style="font-size:150%; color:white;font-family: caviar;text-align: left;">
User Id:
<?php
if($_POST)
echo $a;
?><br>
INFORMATION of BOOKED TICKETS:<br><br>
<?php
if($_POST)
{
$sql="select * from ticket where user_id=$a;";
$res=$conn->query($sql);
if($res->num_rows>0)
{
while($row=$res->fetch_assoc())
{
echo "FROM -> ".$row["initial"]. "<br>" .
"TO -> ".$row["final"]. "<br>" .
"DATE OF JOURNEY -> ".$row["dat"]. "<br>".
"BUS NUMBER -> ".$row["bus_no"]. "<br>" .
"PRICE -> ".$row["price"]."<br><br>";
}
}
else
{
echo "NO TICKETS BOOKED ";
}
}
?>
</font>
</body>
</html>