-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontact.php
35 lines (21 loc) · 845 Bytes
/
contact.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
<?php
error_reporting(0);
session_start();
$db = mysqli_connect("localhost", "root", "", "myshopdb");
if (isset($_POST['registerbtn']))
{
$cuname = mysqli_real_escape_string($db, $_POST['cname']);
$cemail = mysqli_real_escape_string($db, $_POST['cemail']);
$cmobile = mysqli_real_escape_string($db, $_POST['cmobile']);
$csubject = mysqli_real_escape_string($db, $_POST['csubject']);
$ctext = mysqli_real_escape_string($db, $_POST['ctext']);
$sql = "INSERT INTO contact(cname, cemail, cmobile, csubject, ctext) VALUES('$cuname', '$cemail', '$cmobile', '$csubject', '$ctext')";
mysqli_query($db, $sql);
include 'fcontact.php';
}
?>
<script>
alert("<?php
echo "Query Successfully Submitted!";
?>");
</script>