-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsult.php
More file actions
39 lines (32 loc) · 787 Bytes
/
consult.php
File metadata and controls
39 lines (32 loc) · 787 Bytes
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
<?php
$server_name="localhost";
$username="root";
$password="";
$database_name="medical website";
$conn=mysqli_connect($server_name,$username,$password,$database_name);
if(!$conn)
{
die("Connection Failed:" . mysql_connect_errors());
}
if(isset($_POST['save']))
{
$name = $_POST['name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$address = $_POST['address'];
$doctorname = $_POST['doctorname'];
$sql_query="INSERT INTO consult(name,phone,email,address,doctorname)
VALUES('$name','$phone','$email','$address','$doctorname')";
if (mysqli_query($conn, $sql_query))
{
echo "";
}
else
{
echo "Error: " . $sql . "" . mysqli_error($conn);
}
mysqli_close($conn);
}
header("Location: booksucce.html");
exit();
?>