-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdbSOS.php
31 lines (24 loc) · 993 Bytes
/
dbSOS.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
<?php
$name= $_POST['name'];
$email= $_POST['email'];
$time= $_POST['time'];
$phone= $_POST['phone'];
//Database connection
$conn = new mysqli('localhost', 'root', '', 'newdoctor');
if($conn->connect_errno){
die('Connection Failed : '.$conn->connect_error);
}
else {
$reg = $conn->prepare("insert into sos(name, email, time, phone) values(?, ?, ?, ?)");
$reg->bind_param("sssi", $name, $email, $time, $phone);
$reg->execute();
echo ("<script LANGUAGE='JavaScript'>
window.alert('Your information is stored Successfully $name');
window.location.href='SOSform.php';
</script>");
$reg->close();
$conn->close();
// header("Location: http://localhost/Doctor-Appointment-System/Login.php");
exit();
}
?>