-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact_process.php
More file actions
38 lines (38 loc) · 987 Bytes
/
contact_process.php
File metadata and controls
38 lines (38 loc) · 987 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
<?php
session_start();
include('include/config.php');
extract($_POST);
$error=array();
$time=time();
if(! empty($_POST))
{
if(!is_numeric($mno))
{
$error[]="Enter Valid Mobile Number";
}
else if(strlen($mno)<10 || strlen($mno)>10)
{
$error[]="Enter Valid 10 digit Mobile Number";
}
if(!empty($error))
{
$_SESSION['error']=$error;
header("location: contact.php");
}
else
{
$q="insert into contact (co_nm,co_mno,co_email,co_msg,co_time) values('$nm','$mno','$email','$msg','$time')";
mysqli_query($con,$q);
$_SESSION['done']="your message send successfully";
$cont='you have new message <a href="contact_manage.php">View</a>';
$csq="insert into activity (ac_nm,ac_time)
values('$cont','$time')";
mysqli_query($con,$csq);
header("location:contact.php");
}
}
else
{
header("location: contact.php");
}
?>