-
Notifications
You must be signed in to change notification settings - Fork 1
/
customer_display.php
89 lines (76 loc) · 3.18 KB
/
customer_display.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
<?php include '../view/header.php'; ?>
<main>
<!-- display a table of customer information -->
<h2>View/Update Customer</h2>
<form action="." method="post" id="aligned">
<input type="hidden" name="action" value="update_customer">
<input type="hidden" name="customer_id"
value="<?php echo htmlspecialchars($customer_id); ?>">
<label>First Name:</label>
<input type="text" name="first_name"
value="<?php echo htmlspecialchars($first_name); ?>">
<?php echo $fields->getField('first_name')->getHTML(); ?>
<br>
<label>Last Name:</label>
<input type="text" name="last_name"
value="<?php echo htmlspecialchars($last_name); ?>">
<?php echo $fields->getField('last_name')->getHTML(); ?>
<br>
<label>Address:</label>
<input type="text" name="address"
value="<?php echo htmlspecialchars($address); ?>" size="30">
<?php echo $fields->getField('address')->getHTML(); ?>
<br>
<label>City:</label>
<input type="text" name="city"
value="<?php echo htmlspecialchars($city); ?>">
<?php echo $fields->getField('city')->getHTML(); ?>
<br>
<label>State:</label>
<input type="text" name="state"
value="<?php echo htmlspecialchars($state); ?>">
<?php echo $fields->getField('state')->getHTML(); ?>
<br>
<label>Postal Code:</label>
<input type="text" name="postal_code"
value="<?php echo htmlspecialchars($postal_code); ?>">
<?php echo $fields->getField('postal_code')->getHTML(); ?>
<br>
<label>Country:</label>
<select name="country_code">
<?php foreach ($countries as $country) :
if ($country_code == $country['countryCode']) {
$selected = 'selected';
} else {
$selected = '';
}
?>
<option value="<?php echo htmlspecialchars($country['countryCode']); ?>"
<?php echo $selected; ?>>
<?php echo htmlspecialchars($country['countryName']); ?>
</option>
<?php endforeach; ?>
</select>
<br>
<label>Phone:</label>
<input type="text" name="phone"
value="<?php echo htmlspecialchars($phone); ?>">
<?php echo $fields->getField('phone')->getHTML(); ?>
<br>
<label>Email:</label>
<input type="text" name="email"
value="<?php echo htmlspecialchars($email); ?>" size="30">
<?php echo $fields->getField('email')->getHTML(); ?>
<br>
<label>Password:</label>
<input type="text" name="password"
value="<?php echo htmlspecialchars($password); ?>">
<?php echo $fields->getField('password')->getHTML(); ?>
<br>
<label> </label>
<input type="submit" value="Update Customer">
<br>
</form>
<p><a href="">Search Customers</a></p>
</main>
<?php include '../view/footer.php'; ?>