-
Notifications
You must be signed in to change notification settings - Fork 4
/
doctorform.php
107 lines (98 loc) · 4.05 KB
/
doctorform.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
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Doctor Registration</title>
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<link href="assets/vendor/animate.css/animate.min.css" rel="stylesheet">
<link href="assets/vendor/aos/aos.css" rel="stylesheet">
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet">
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<link rel = "stylesheet" href = "assets/css/styles1.css">
<link rel = "stylesheet" href = "assets/css/style.css">
</head>
<body>
<div class = "form-page-container">
<div class="container d-flex align-items-center">
<h1 class="logo me-auto"><a href="index.html">SAHAYOGI</a></h1>
<nav id="navbar" class="navbar order-last order-lg-0">
<ul>
<li><a class="active" href="index.html">HOME</a></li>
<li><a href="education_main.html">EDUCATION</a></li>
<li><a href=" health_main_eng.html">HEALTHCARE</a></li>
<li><a href="volunteer.html"><span>GET INVOLVED</span> </a></li>
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav><!-- .navbar -->
</div>
<div class="box">
<div class="bag">
<div class = "form">
<h2>Register yourself as a Doctor <br></h2>
<form name = "doctor" ACTION = "doctorform.php" METHOD = "POST" autocomplete = "off" >
<div class = "input-box">
<input type="text" id="fname" name="fname" required placeholder="First Name">
</div>
<div class = "input-box">
<input type="text" id="mname" name="mname" placeholder="Middle Name">
</div>
<div class = "input-box">
<input type="text" id="lname" name="lname" placeholder="Last Name">
</div>
<div class = "input-box">
<input type="text" id="phone" name="phone" required placeholder="Mobile Number">
</div>
<div class = "input-box">
<input type= "email" id="docmail" name="docmail" placeholder="Email" >
</div>
<div class = "input-box">
<input type = "text" id = "hname" name="hname" placeholder="Hospital ">
</div>
<div class = "input-box">
<input type = "text" id = "loc" name="loc" placeholder="Locality ">
</div>
<div class = "input-box">
<input type = "text" id = "expert" name="expert" placeholder="Specialty " >
</div>
<input type="submit" name = "Register" value="Register">
</form>
</div>
</div>
</div>
<?php
$host = "localhost";
$user = "root";
$pass = "";
$db_name = "sehyogi";
$con = mysqli_connect($host,$user,$pass,$db_name);
if(mysqli_connect_errno())
{
die("Failed to connect to database".mysqli_connect_error());
}
if(isset($_POST['Register']))
{
$fname = $_POST['fname'];
$mname = $_POST['mname'];
$lname = $_POST['lname'];
$mobileno = $_POST['phone'];
$email = $_POST['docmail'];
$hospital = $_POST['hname'];
$loc = $_POST['loc'];
$spec = $_POST['expert'];
$newdoc = "INSERT INTO Doctor (FirstName, MidName, LastName, MobileNo,Email,Hospital,Locality,Expertise)
VALUES ('$fname', '$mname', '$lname', '$mobileno', '$email','$hospital','$loc','$spec')";
if(mysqli_query($con,$newdoc))
{
header('Location: final_volunteer.html');
}
}
?>
</body>
</html>