-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbusiness_update_record.php
95 lines (85 loc) · 2.6 KB
/
business_update_record.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<style>
.frm-group form {
background-color: #C1B7BB; /* Gray background */
border: 1px solid black; /* black border */
color: white; /* White text */
padding: 10px 24px; /* Some padding */
cursor: pointer; /* Pointer/hand icon */
float: left; /* Float the buttons side by side */
}
/* Clear floats (clearfix hack) */
.frm-group:after {
content: "";
clear: both;
display: table;
}
.frm-group form:not(:last-child) {
border-right: none; /* Prevent double borders */
}
/* Add a background color on hover */
.frm-group form:hover {
background-color: #0045B0;
}
</style>
<script type="text/javascript">
function ClearPlaceHolder (input) {
input.defaultValue==""
if (input.value == input.defaultValue) {
input.value = "";
}
}
function SetPlaceHolder (input) {
if (input.value == "") {
input.value = input.defaultValue;
}
}
function submitForm(action) {
var form = document.getElementById('form1');
form.action = action;
form.submit();
</script>
<title>Business Customer Information Screen</title>
</head>
<body bgcolor="#C3B7BC">
<h1><font color="071D49"><center>Business Customer Information Screen</center></font></h1>
<?php
$db = mysqli_connect('localhost:3306', 'staffmember', 'Customer1');
mysqli_select_db($db, 'business_info');
$query = "UPDATE clientinfo SET
salut='$_POST[salut]',
firstname='$_POST[firstname]',
mid_init = '$_POST[mid_init]',
lastname = '$_POST[lastname]',
suffix = '$_POST[suffix]',
title ='$_POST[title]',
company_name = '$_POST[company_name]',
department = '$_POST[department]',
address1 = '$_POST[address1]',
address2 = '$_POST[address2]',
suite_no = '$_POST[suite_no]',
city ='$_POST[city]',
state ='$_POST[state]',
postal_code ='$_POST[postal_code]',
zip_code = '$_POST[zip_code]',
mobile_phone = '$_POST[mobile_phone]',
office_phone = '$_POST[office_phone]',
home_phone = '$_POST[home_phone]',
fax_phone = '$_POST[fax_phone]',
office_email = '$_POST[office_email]',
home_email = '$_POST[home_email]',
company_website = '$_POST[company_website]',
gender = '$_POST[gender]',
age = '$_POST[age]',
notes = '$_POST[notes]'
WHERE PersonID = '$_POST[PersonID]'";
if (mysqli_query($db, $query))
header("refresh:1; url=business_first_record.php");
else
echo "Record was not updated."
//$db->close();
?>
</body>
</html>