-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin-services-add.php
68 lines (61 loc) · 3.31 KB
/
admin-services-add.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
<?php
include("include/admin-header.php");
?>
<!--MAIN Content-->
<div class="row clearfix">
<div class="col-md-6">
<div class="card">
<div class="body">
<form action="#" method="post">
<div class="row clearfix">
<div class="col-lg-6 col-md-12">
<h6>Add New Service</h6>
<div class="form-group">
<label><small>Service Name</small></label>
<input type="text" class="form-control" placeholder="Service Name" name="sname">
</div>
<div class="form-group">
<label><small>Service Discription</small></label>
<input type="text" class="form-control" placeholder="Service Discription" name="disc">
</div>
<div class="form-group">
<label><small>Dealy Available Time </small></label>
<input type="time" class="form-control" placeholder="Available Time" name="atime">
</div>
<div class="form-group">
<label><small>Dealy End Time </small></label>
<input type="time" class="form-control" placeholder="End Time" name="etime">
</div>
<div class="form-group">
<label><small>Service Charge</small></label>
<input type="text" class="form-control" placeholder="Fee" name="fee">
</div>
</div>
</div>
<button type="submit" class="btn btn-primary" name="Add">Add Service</button>
</form>
</div>
</div>
</div>
</div>
<?php
include("include/admin-footer.php");
if(isset($_POST['Add']))
{
if(isset($_POST["sname"])&& isset($_POST["atime"]) && isset($_POST["etime"]) && isset($_POST["fee"]) && isset($_POST["disc"]))
{
$sname=$_POST["sname"];
$atime=$_POST["atime"];
$etime=$_POST["etime"];
$fee=$_POST["fee"];
$disc=$_POST["disc"];
$sql= "INSERT INTO `hospital`.`servicetest` (`name`, `availableStartTime`, `availableEndTime`, `serviceCharges`, `discription`) VALUES ('$sname', '$atime', '$etime', '$fee', '$disc');
";
$insert = mysqli_query($conn,$sql);
if($insert)
{
echo"<script>window.alert('Successfully');</script>";
}else echo"<script>window.alert('Please Retry');</script>";
}else echo"<script>window.alert('Please Fill Information Properly');</script>";
}
?>