-
Notifications
You must be signed in to change notification settings - Fork 0
/
userdetail_form.php
executable file
·267 lines (237 loc) · 9.22 KB
/
userdetail_form.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<?
/*********************************************************************/
/* Include the Configuration file. This includes system dependant */
/* variables that allow the system to be flexible and for future */
/* expansion. */
/*********************************************************************/
include "configuration.php";
$title = "Member Details";
?>
<?
/*********************************************************************/
/* Include the Header file. This is the logo, system name, and menu */
/*********************************************************************/
include "header.php";
?>
<?
/*********************************************************************/
/*
Writen By: Shawn Keown
Last Modified: July 9, 2001
Called By: Nothing
Calls: UserDetailForm.php
Description: This is where a user would edit their data within the
system.
Modification History:
July 18, 2001 - Form Created
October 27, 2001 - Added all fields
*/
/*********************************************************************/
?>
<?
/*********************************************************************/
/* PAGE STARTS HERE File: userdetail_form.php*/
/*********************************************************************/
?>
<? /*Perform Queries here*/
include "connectdb.php";
$deliveryOptions = mysql_query("SELECT DeliveryMethodID, DeliveryMethodName
FROM deliverymethodoptions");
$result = mysql_query("SELECT *
FROM member
WHERE MemberID = '$MemberID'");
if ($result)
{
$numberOfRows = mysql_num_rows($result);
$currentRow = mysql_fetch_array($result);
if ($currentRow)
{
?>
<form action="userdetail_entry.php" method="post">
<input type="hidden" value="<?print($MemberID)?>" name="ModifyMemberID">
<table>
<tr>
<th align=center colspan=2 bgcolor="#D3D3D3">Name</th>
</tr>
<tr>
<th align=left>First Name:</th>
<td><input READONLY name="NewFirstName" type="text" size="15" maxlength="15" value="<?print($currentRow["MemberFirstName"])?>"></td>
</tr>
<tr>
<th align=left>Middle Name:</th>
<td><input READONLY name="NewMiddleName" type="text" size="15" maxlength="15" value="<?print($currentRow["MemberMiddleName"]);?>"></td>
</tr>
<tr>
<th align=left>Last Name:</th>
<td><input READONLY name="NewLastName" type="text" size="15" maxlength="15" value="<?print($currentRow["MemberLastName"]);?>"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Save Changes"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<th align=center colspan=2 bgcolor="#D3D3D3">Mailing Address</th>
</tr>
<tr>
<th align=left>Address1:</th>
<td><input type="text" name="NewMailingAddress1" size="50" maxlength="50" value="<?print($currentRow["MailingAddress1"]);?>"></td>
</tr>
<tr>
<th align=left>Address2:</th>
<td><input type="text" name="NewMailingAddress2" size="50" maxlength="50" value="<?print($currentRow["MailingAddress2"]);?>"></td>
</tr>
<tr>
<th align=left>City:</th>
<td><input type="text" name="NewMailingCity" size="20" maxlength="20" value="<?print($currentRow["MailingCity"]);?>"></td>
</tr>
<tr>
<th align=left>Province:</th>
<td><input type="text" name="NewMailingProvince" size="2" maxlength="2" value="<?print($currentRow["MailingProvince"]);?>"></td>
</tr>
<tr>
<th align=left>Postal Code:</th>
<td><input type="text" name="NewMailingPostalCode" size="7" maxlength="7" value="<?print($currentRow["MailingPostalCode"]);?>"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Save Changes"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<th align=center colspan=2 maxlength="2" bgcolor="#D3D3D3">Street Address</th>
</tr>
<tr>
<th align=left>Address1:</th>
<td><input type="text" name="NewStreetAddress1" size="50" maxlength="50" value="<?print($currentRow["StreetAddress1"]);?>"></td>
</tr>
<tr>
<th align=left>Address2:</th>
<td><input type="text" name="NewStreetAddress2" size="50" maxlength="50" value="<?print($currentRow["StreetAddress2"]);?>"></td>
</tr>
<tr>
<th align=left>City:</th>
<td><input type="text" name="NewStreetCity" size="20" maxlength="20" value="<?print($currentRow["StreetCity"]);?>"></td>
</tr>
<tr>
<th align=left>Province:</th>
<td><input type="text" name="NewStreetProvince" size="2" maxlength="2" value="<?print($currentRow["StreetProvince"]);?>"></td>
</tr>
<tr>
<th align=left>Postal Code:</th>
<td><input type="text" name="NewStreetPostalCode" size="7" maxlength="7" value="<?print($currentRow["StreetPostalCode"]);?>"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Save Changes"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<th align=center colspan=2 bgcolor="#D3D3D3">Phone & Internet</th>
</tr>
<tr>
<th align=left>Home Number:</th>
<td><input type="text" name="NewHomeNumber" size="20" maxlength="20" value="<?print($currentRow["HomeNumber"]);?>"></td>
</tr>
<tr>
<th align=left>Other Number:</th>
<td><input type="text" name="NewOtherNumber" size="20" maxlength="20" value="<?print($currentRow["OtherNumber"]);?>"></td>
</tr>
<tr>
<th align=left>Email Address:</th>
<td><input type="text" name="NewEmailAddress" size="50" maxlength="50" value="<?print($currentRow["EmailAddress"]);?>"></td>
</tr>
<tr>
<th align=left>Homepage Address:</th>
<td><input type="text" name="NewHomeURL" size="50" maxlength="128" value="<?print($currentRow["HomeURL"]);?>"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Save Changes"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<th align=center colspan=2 bgcolor="#D3D3D3">Options</th>
</tr>
<tr>
<th align=left>Delivery Method:</th>
<td><select name="NewDeliveryMethodID">
<option value="0">Select Method:
<option value="0">
<?
for($i=0; $i< mysql_num_rows($deliveryOptions); $i++)
{
print('<option value="'.
mysql_result($deliveryOptions, $i, "DeliveryMethodID").
'"');
if( mysql_result($deliveryOptions, $i, "DeliveryMethodID")
== mysql_result($result, 0, "DeliveryMethodID") )
{
print(" SELECTED ");
}
print('>'.
mysql_result($deliveryOptions, $i, "DeliveryMethodName"));
}
?>
</select>
</td>
</tr>
<tr>
<th align=left>Public Profile:</th>
<td><textarea name="NewProfile" cols="50" rows="5" maxlength="255" wrap="hard"><?print($currentRow["Profile"]);?></textarea></td>
</tr>
<tr>
<th align=left>Show Profile:</th>
<td>
<select name="NewProfileEnabled">
<option value="0">No
<option value="1"<?if($currentRow["ProfileEnabled"] == "1")print(" selected");?>>Yes
</select>
</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Save Changes"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</form>
<?
}
else
{
print("Failed to fetch Member Details from Database. Please reLogin and try again");
}
}
else
{
print("Failed to locate your MemberID in the Database. Please reLogin and try again");
}
?>
<?
/*********************************************************************/
/* PAGE ENDS HERE File: Template.php */
/*********************************************************************/
?>
<?
/*********************************************************************/
/* And finally include the Footer file. This makes things nice and */
/* and proclaims to the world how amazing we all are. */
/*********************************************************************/
include "footer.php";
?>