-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregi.php
More file actions
70 lines (66 loc) · 2.52 KB
/
regi.php
File metadata and controls
70 lines (66 loc) · 2.52 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
<?php
require_once('config.php');
?>
<html>
<head>
<title> Doctor Appoinment </title>
</head>
<body>
<style>
body {
background-image: url('https://img.freepik.com/premium-photo/medical-doctor-workspace-concept-with-medical-equipment-color-background_44344-1492.jpg?w=2000');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
}
</style>
<div>
<?php
if(isset($_POST['create'])){
$Pname=$_POST['Pname'];
$PhoneNumber=$_POST['PhoneNumber'];
$Email=$_POST['Email'];
$Appoinment=$_POST['Appoinment'];
$time=$_POST['time'];
$Doctor=$_POST['Doctor'];
$Issue=$_POST['Issue'];
$sql = "INSERT INTO users(Name,PhoneNumber,Email,Appoinment ,time , Doctor,Issue) VALUES (?,?,?,?,?,?,?)";
$STMTinsert = $db->prepare($sql);
$result = $STMTinsert->execute([$Pname , $PhoneNumber , $Email , $Appoinment , $time , $Doctor , $Issue]);
if($result){
echo'Successfully Booked Your Appoinment ';
}
else {
echo 'There is a Error uh !';
}
}
?>
</div>
<DIV>
<form action="regi.php" method = "POST">
<div class="container">
<h1>Register </h1>
<p> Fill up the form with correct values </p>
<label for="Pname"><b> Name <b></label><br><br>
<input type="text" name="Pname" required> <br><br>
<label for="PhoneNumber"><b> Phone Number <b></label><br><br>
<input type="text" name="PhoneNumber" required><br><br>
<label for="Email"><b> Email<b></label><br><br>
<input type="email" name="Email" required><br><br>
<label for="Appoinment"><b> Appoinment Date <b></label><br><br>
<input type="date" name="Appoinment" required><br><br>
<label for="time"><b> Appoinment time <b></label><br><br>
<input type="time" name="time" required><br><br>
<label for="Doctor"><b> Doctor Date<b></label><br><br>
<input type="text" name="Doctor" required><br><br>
<label for="Issue"><b> Health Issue<b></label><br><br>
<input type="text" name="Issue" required><br><br>
<input type="reset" name="clean" value="Reset"><br><br>
<input id ="red" type="submit" name="create" Value="Appoint Now !"> <br> <br>
</div>
</form>
<center>
<h1> <a href="index.html">Back </a> </h1>
</center>
</body>
</html>