-
Notifications
You must be signed in to change notification settings - Fork 0
/
AddCourt.php
76 lines (55 loc) · 2.45 KB
/
AddCourt.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
<?php
$conn = mysqli_connect('localhost', 'mani1', 'mani2002', 'crms');
if (isset($_POST['bclkcourt'])) {
$courtid = ($_POST['CourtID']);
$courtname = ($_POST['CourtName']);
$courttype = ($_POST['CourtType']);
$courtcity = ($_POST['CourtCity']);
$courtstate = ($_POST['CourtState']);
$courtcountry = ($_POST['CourtCountry']);
$sql = "INSERT INTO `courts` (`courtid`,`courtname`,`courttype`,`courtcity`,`courtstate`,`courtcountry`) VALUES ('$courtid', '$courtname', '$courttype','$courtcity','$courtstate','$courtcountry')";
$rs = mysqli_query($conn, $sql);
if (!$rs) {
echo mysqli_error($conn);
} else {
header("Location: Court.php");
}
}
mysqli_close($conn);
?>
<!DOCTYPE html>
<html lang="en">
<?php include('header.html'); ?>
<?php include('AddCourt.html'); ?>
<div class="form" method="POST" action="AddCourt.php">
<form method="POST" action="AddCourt.php">
<div class="contain">
<span id="title">
<h1>Add Court</h1>
<p>Please fill the details of the new court</p>
</span>
<hr>
<label for="Cid"><b>Court ID: </b></label>
<input type="text" placeholder="Enter Court ID" name="CourtID" id="Cid" required>
<br>
<label for="Cname"><b>Court Name: </b></label>
<input type="text" placeholder="Enter Court Name" name="CourtName" id="Cname" required>
<br>
<label for="Cty"><b>Type: </b></label>
<input type="text" placeholder="Enter Court Type" name="CourtType" id="Cty" required>
<br>
<label for="Ccty"><b>City: </b></label>
<input type="text" placeholder="Enter Court City" name="CourtCity" id="Ccty" required>
<br>
<label for="Cst"><b>State: </b></label>
<input type="text" placeholder="Enter Court State" name="CourtState" id="Cst" required>
<br>
<label for="Pcoun"><b>Country: </b></label>
<input type="text" placeholder="Enter Court Country" name="CourtCountry" id="Pcoun" required>
<a class=" button-1 btn btn-success btn-lg" href="Court.php" role="button">Go Back</a>
<button style="margin-left: 25.24em;" class=" button-1 btn btn-success btn-lg" value="Save" name="bclkcourt">Save</button>
</div>
</form>
</div>
</body>
</html>