<?php
include '../connection.php';
if(isset($_POST['submit'])){
$username = $_POST['name'];
$email = $_POST['email'];
$address = $_POST['address'];
$massage = $_POST['msg'];
}
$insertquery = "insert into contact_us(name,email,address,massage) value('$username','$email', '$address','$massage')";
$res = mysqli_query($con,$insertquery);
if($res){
?>
<script>
alert("Massage Send Successfully");
window.location.replace('../index.php');
</script>
<?php
}
else{
?>
<script>
alert(" Massage not send.");
window.location.replace('../index.php');
</script>
<?php
}
?>
0 Comments