/
frmfeedback_db.php
69 lines (62 loc) · 1.62 KB
/
frmfeedback_db.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
include_once("model/GenericTable.php");
include_once("header.php");
if(isset($_POST))
{
$userid = $_POST['username'];
$locid = $_POST['locid'];
$title = $_POST['tile'];
$name = $_POST['name'];
$mobile = $_POST['mobile'];
$email = $_POST['email'];
$dob = $_POST['dob'];
$age = $_POST['age'];
$iam = $_POST['radios'];
if($iam == "others")
{
$iam = $_POST['other'];
}
$interest = implode(",",$_POST['interested']);
$currently = implode(",",$_POST['chk']);
$chkother = $_POST['chkother'];
$sales_radios = $_POST['sales_radios'];
$customer_radios = $_POST['customer_radios'];
$knownby = $_POST['knowby'];
$appreciate = $_POST['appreciate'];
$serve = $_POST['serve'];
$otablefeedback = new GenericTable($dbh,'fb_feedback');
$list = Array(
'userid'=>$userid,
'locid'=>$locid,
'title'=>$title,
'name'=>$name,
'mobile'=>$mobile,
'mailid'=>$email,
'dob'=>$dob,
'age'=>$age,
'designation'=>$iam,
'interest'=>$interest,
'currently'=>$currently,
'currentlyothers'=>$chkother,
'salepro'=>$sales_radios,
'customerexp'=>$customer_radios,
'knownby'=>$knownby,
'appreciate'=>$appreciate,
'serveby'=>$serve,
'timestamp'=>time()
);
$id = $otablefeedback->insertRow($list);
$fid = 'FB' . $instance_identifier . $id;
$hashid = md5($fid.$name.$mobile);
$updatelist = Array(
'FBID'=>$fid,
'HASHID'=>$hashid
);
$clause = "where ID='$id'";
$otablefeedback->updateRow($updatelist,$clause);
}
?>
<script type="text/javascript">
alert("Thanks For Your feedback");
window.location.href = "index.php";
</script>