-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreporting.php
94 lines (83 loc) · 3.12 KB
/
reporting.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
<?php include_once('includes/config.php');
if(isset($_POST['submit'])){
$fname=$_POST['fullname'];
$mno=$_POST['mobilenumber'];
$location=$_POST['location'];
$message=$_POST['message'];
$query=mysqli_query($con,"insert into tblfirereport(fullName,mobileNumber,location,messgae) value('$fname','$mno','$location','$message')");
if($query){
echo "<script>alert('Reporting successfull');</script>";
echo "<script>window.location.href ='reporting.php'</script>";
} else {
echo "<script>alert('Something went wrong. Please try again.');</script>";
echo "<script>window.location.href ='reporting.php'</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>OFMS | Reporting</title>
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="css/styles.css" rel="stylesheet" />
</head>
<body>
<!-- Responsive navbar-->
<?php include_once('includes/header.php') ?>
<!-- Page Content-->
<div class="container px-4 px-lg-5">
<!-- Heading Row-->
<div class="row gx-4 gx-lg-5 align-items-center my-5">
<div class="col-lg-12"><img class="img-fluid rounded mb-4 mb-lg-0" src="assets/6094899.jpg" alt="..." /></div>
</div>
<!-- Content Row-->
<div class="row gx-4 gx-lg-5">
<div class="col-md-12 mb-5">
<div class="card h-100">
<div class="card-body">
<h2 class="card-title">Online Fire Report</h2>
<form method="post">
<table class="table table-bordered">
<tbody>
<tr>
<th>Name</th>
<td><input type="text" name="fullname" class="form-control" required></td>
</tr>
<tr>
<th>Mobile Number</th>
<td><input type="text" name="mobilenumber" class="form-control" required></td>
</tr>
<tr>
<th>Location</th>
<td><textarea class="form-control" required name="location"></textarea></td>
</tr>
<tr>
<th>Message (if Any)</th>
<td><textarea class="form-control" required name="message"></textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="submit" class="btn btn-primary"></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Footer-->
<?php include_once('includes/footer.php') ?>
<!-- Bootstrap core JS-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<!-- Core theme JS-->
<script src="js/scripts.js"></script>
</body>
</html>