-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch_stadium.php
64 lines (45 loc) · 2.42 KB
/
search_stadium.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
<?php
include("include/adminheader.php");
echo("<h1 style= \"text-align: center\">Stadiums Of the League</h1><br><br>");
echo("
<form \"form-search\" action=\"search_stadium.php\" method=\"post\" >
<div class=\"input-append\" style=\" float:right; margin-bottom:5px;\">
<select name=\"catagory\" class=\"btn\" style=\"background: black;color: white; width: 140px\">
<option value=\"stadium_name\" >Stadium Name</option>
<option value=\"city\">City</option>
</select>
<input name=\"param\" class=\"span2\" id=\"appendedInputButtons\" type=\"text\" style=\"background: black;color: white;\" required>
<button class=\"btn\" type=\"submit\" style=\"background: black;color: white;\">GO!</button>
</div>
</form>");
$att = $_POST["catagory"];
$src= $_POST["param"];
$db = oci_connect('system','1234','xe');
$sql="select * from stadiums where {$att} like '%{$src}%'";
$result=oci_parse($db,$sql);
oci_execute($result);
//echo $result;
echo ("<table class = \"table table-bordered\" style= \"background: black;color:white; border-radius:10px\" >");
echo " <tr>
<th>Stadium Id</th>
<th>Stadium Name</th>
<th>Capacity</th>
<th>Street</th>
<th>Area</th>
<th>City</th></tr>";
while($row=oci_fetch_array($result))
{
echo "<tr>
<td><a href=\"stadium_details.php?id={$row[0]}\"> {$row[0]} </a></td>
<td> {$row[1]}</td>
<td> {$row[2]}</td>
<td> {$row[3]}</td>
<td> {$row[4]}</td>
<td> {$row[5]}</td>
</tr>";
}
echo "</table>";
?>
<?php
include("include/adminfooter.php");
?>