forked from mitul3737/Mafias-Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
patientSignUpConf.php
43 lines (33 loc) · 1.44 KB
/
patientSignUpConf.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
require_once('hospitaldb_connect.php');
if (isset($_POST['p_name']) && isset($_POST['p_email']) && isset($_POST['p_gender']) && isset($_POST['p_address']) && isset($_POST['p_phone']) && isset($_POST['p_pass']) && isset($_POST['p_height']) && isset($_POST['p_weight']) && isset($_POST['p_bg']) && isset($_POST['p_bp'])) {
$p_name = $_POST['p_name'];
$p_email = $_POST['p_email'];
$p_gender = $_POST['p_gender'];
$p_address = $_POST['p_address'];
$p_phone = $_POST['p_phone'];
$p_pass = $_POST['p_pass'];
$p_height = $_POST['p_height'];
$p_weight = $_POST['p_weight'];
$p_bg = $_POST['p_bg'];
$p_bp = $_POST['p_bp'];
$sql = "INSERT INTO patients VALUES ('$p_name', '$p_email', '$p_pass', '$p_gender', '$p_address', '$p_phone', '$p_weight', '$p_bg', '$p_bp', '$p_height')";
$result = mysqli_query($connection, $sql);
if (mysqli_affected_rows($connection)) {
header("Location: patientsigninpage.php");
exit;
} else {
echo "Registration Failed!";
}
}
?>
</body>
</html>