-
Notifications
You must be signed in to change notification settings - Fork 1
/
appointment_db.php
56 lines (33 loc) · 1.16 KB
/
appointment_db.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
<?php include "db_connection.php" ?>
<?php
if (isset($_POST['submit'])) {
//insert Data
$patient_name = $_POST['patient_name'];
$contact_no = $_POST['contact_no'];
$patient_address = $_POST['patient_address'];
$patient_age = $_POST['patient_age'];
$patient_gender = $_POST['patient_gender'];
$appointment_date = $_POST['appointment_date'];
$insert = "";
//email check
$insert = "INSERT INTO appointment (patient_name, contact_no, patient_address,patient_age, patient_gender, appointment_date ) VALUES ('sabbir','$contact_no','$patient_address','$patient_age', '$patient_gender','$appointment_date')";
$results = mysqli_query($db, $insert);
var_dump($insert);
if ($results) {
// echo 'Saved!';
header("Location:appointment_saved.php");
}else{
echo mysqli_error($db);
echo "appointment save Error!";
}
//get value from database
// $sql = "SELECT * FROM signup";
// $result = mysqli_query($db, $sql);
// if(mysqli_num_rows($result) > 0){
// while($row = mysqli_fetch_assoc($result)) {
// echo "First Name: " .$row["first_name"] ."</br>";
// }
// }
}
mysqli_close($db);
?>