-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess2.php
More file actions
34 lines (26 loc) · 818 Bytes
/
Copy pathprocess2.php
File metadata and controls
34 lines (26 loc) · 818 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
<?php
require_once ('connection.php');
if(isset($_POST['submit_btn']))
{
$Username = mysqli_real_escape_string($con,$_POST['usrnm']);
$Email = mysqli_real_escape_string($con,$_POST['email']);
$Subject = mysqli_real_escape_string($con,$_POST['subject']);
if(empty($Username) || empty($Email) )
{
echo 'Please fill all the fields';
}
else
{
$sql = "insert into contact (Uname,Email,Subject) values('$Username','$Email','$Subject')";
$result = mysqli_query($con,$sql);
if ($result)
{
echo 'Your message has reached us.Thanks for contacting us. :)';
}
else
{
echo 'Check your query';
}
}
}
?>