-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathiform.php
More file actions
143 lines (133 loc) · 5.9 KB
/
iform.php
File metadata and controls
143 lines (133 loc) · 5.9 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
require 'connect.php';
if(isset($_POST["submit"])){
$loc=mysqli_real_escape_string($db , $_POST["location"] );
$area=mysqli_real_escape_string($db , $_POST["area"] );
$vtype=mysqli_real_escape_string($db , $_POST["vtype"]);
$vcolor=mysqli_real_escape_string($db , $_POST["vcolor"]);
$plt=mysqli_real_escape_string($db , $_POST["plate"]);
$descr=mysqli_real_escape_string($db , $_POST["description"] );
$sql="INSERT INTO reports (Location,Vehicle_Type,Description,Plate_Number,Area,Vehicle_color) VALUES ('$loc','$vtype','$descr','$plt','$area','$vcolor')";
if(mysqli_query($db, $sql)){} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($db);
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Crime Description</title>
<!-- Core CSS file-->
<link href="css/min_ss.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/business-frontpage.css" rel="stylesheet">
<style type="text/css">
th {
background-color: #343a40;
color: white;
font-weight: 700;
padding: 5px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.navbar-brand {
font-size: 15px;
font-weight: lighter;
font-family: sans-serif;
color: grey;
}
body{
background-color:whitesmoke;
}
</style>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="home.php">Home</a>
<a class="navbar-brand" href="about.php">Latest Feeds</a>
<a class="navbar-brand" href="charge.html">Charge Sheet</a>
<a class="navbar-brand" href="index.php">Logout</a>
</div>
</nav>
<!-- Header with Background Image -->
<header class="business-header" style="min-height: 140px;background-image:url(resources/images/iform.jpg)">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="display-3 text-center mt-4" style="font-weight: bold;font-size: 50px; color:sandybrown">Incident Description</h1>
<hr style="width: 15cm">
</div>
</div>
</div>
</header>
<div class="container">
<p>The <strong>iDescription</strong> form allows users/witnesses to briefly describe the details of a particular incidence. The user can describe the incidence in terms of full vehicle description including plate number and color,state of the persons involved and incidence location, using the form below: </p>
<hr>
</div>
<form method="POST" action="iform.php" align="center" style="width:auto; height:auto">
<table align="center">
<tr>
<th colspan="4">Fill form below:</th>
</tr>
<tr>
<td>Location <b style="color:red">*</b></td>
<td>
<select name="location" required>
<option selected>Choose location...</option>
<option>Nakuru</option>
<option>Nairobi</option>
<option>Kisumu</option>
<option>Eldoret</option>
<option>Naivasha</option>
<option>Mombasa</option>
</select>
</td>
</tr>
<tr>
<td>Area (<i>specify location and road</i>)<b style="color:red">*</b></td>
<td><input type="text" name="area" placeholder="Umoja Kangundo Road" required></td>
</tr>
<tr>
<td>
Vehicle Type <i>(optional)</i>
</td>
<td>
<select name="vtype" required>
<option selected>Choose vehicle type...</option>
<option>Van</option>
<option>Matatu PSV</option>
<option>Pickup</option>
<option>Bus</option>
<option>Bus PSV</option>
<option>Lorry</option>
<option>Trailer</option>
<option>Motorcycle</option>
<option>Saloon Car </option>
<option>Family Car</option>
<option>other</option>
</select>
</td>
</tr>
<tr>
<td>Vehicle Color</td>
<td><input type="text" name="vcolor" placeholder="white..." required></td>
</tr>
<tr>
<td>Plate Number <b style="color:red">*</b></td>
<td>
<input type="text" name="plate" placeholder="kaa 222l" required></td>
</tr>
<tr>
<td>Crime Description <b style="color:red">*</b></td>
<td><textarea name="description" placeholder="Hit and run, state of passenger critical, need emergency..." maxlength="150" required></textarea></td>
</tr>
<tr>
<td colspan="2"><input name="submit" type="submit" onclick="Conbit()" value="Submit" class="btn btn-primary" align="center"></td>
</tr>
</table>
</form>
</body>
</html>