-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact_details_add.php
30 lines (24 loc) · 1.14 KB
/
contact_details_add.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
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<body>
<h1 style="color: green">
<?php
$name=$_POST['txtName'];
$email=$_POST['txtEmail'];
$subject=$_POST['txtSubject'];
$msg=$_POST['txtMessage'];
$con = mysqli_connect('localhost','root','','sas_db');
$quy = "INSERT INTO `contact_us`(`con_name`, `con_email`, `con_sub`, `com_msg`) VALUES ('$name','$email','$subject','$msg')";
$run = mysqli_query($con,$quy);
if ($run == TRUE)
{
echo "contact details added";
}
else
{
echo "Error! In the Insertion";
}
?>
</h1>