Telkens als ik wil registreren met dit script op localhost krijg is een internal server error.
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
| <? if ($HTTP_HOST == "localhost") include("connectlocal.inc"); else include("connectgtiman.inc"); // gebruik remote versie van inlogbestand $err ="no"; if (!ereg("[A-Za-z0-9_-]+([\.]{1}[A-Za-z0-9_-]+)*@[A-Za-z0-9-]+([\.]{1}[A-Za-z0-9-]+)+",$femail)) { $msg="<font color='Red'><b>emailadres not correct!</b></font>"; $err="yes"; } if($fusername == '' || $fpassword == "" || $femail == "") { $msg="<b><font color='Red'>You forgot to fill in some required fields (*)</font></b>"; $err = "yes"; } //elseif($fpassword != $fpassword2) //{ //$msg="<b><font color='Red'>passwords didn't match!</font></b>"; //$err = "yes"; // } if($err=="no") { mysql_connect($site,$user,$pass); @mysql_select_db($dbname) or die( "Could not open database"); // Controleer op bestaan username $query="select * from $table2 where username = '$fusername'"; $result=mysql_query($query); $aantal = mysql_num_rows($result); if ($aantal > 0) $msg="<b><font color='Red'>username already exists</font></b>"; else { $fusername = strtoupper($fusername); $fpassword = strtoupper($fpassword); $fpassword2 = strtoupper($fpassword2); $femail = strtoupper($femail); $tijd=time(); $query1 = "insert into $table2 (id, username, password, email, country, controller, date_added, uploads, comment, status) VALUES ('','$fusername','$fpassword','$femail','$country','$controller', '$tijd', '','', 'user')"; mysql_db_query($dbname,$query1); print mysql_error(); //$message=" As you have seen, it is a good way to measure your skill in simracing. As a reminder we confirm your password: '$fpassword'. We hope to see you again soon! sincerely yours, Webmaster Hotlap(c) 2001"; //mail($fmail, "registration Hotlap (c)2001", "dear '$username' from '$country',\\We are glad you joined our hotlapcompetition."); echo "<meta http-equiv=Refresh content=3;url=login.php>"; exit; } } ?> <html> <head><title>Register Hotlap</title> <link rel="stylesheet" href="style2.css" type="text/css"> </head> <? if($msg=="") $msg="We will not compromise your privacy"; else $msg=$msg; ?> <body scroll="no"> <form name="form" action="<?echo $SCRIPT_NAME;?>" method="post" enctype="multipart/form-data"> <table width="348" border="1" bordercolor="#000000" align="center"> <tr> <td> <table width="100%" border="0" cellpadding="3" cellspacing="0" height="100%" bgcolor="#CCCCCC"> <tr> <td colspan="4" bgcolor="#000000"> <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><b>- Register - </b></font></div> </td> </tr> <tr> <td colspan=4 bgcolor='Gray'><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="index.php">Hotlap</a> | <a href="login.php">Login</a> | <a href="members.php?return=register.php">members</a> | <a href="about.php?return=register.php">about</a></font></td> </tr> <tr> <td width="37%" height="25"> <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">name</font></div> </td> <td colspan="3" height="25" width="63%"> <input type=text name=fusername size=20 maxlength=15 > <font color="#FF0000">* </font></td> </tr> <tr> <td width="37%" height="17"> <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">password</font></div> </td> <td colspan="3" height="17" width="63%"> <input type=text name=fpassword size=15 maxlength=10 > <font color="#FF0000">* </font></td> </tr> <tr> <td width="37%"> <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">password again</font></div> </td> <td colspan="3" width="63%"> <input type=text name=fpassword2 size=15 maxlength=10 > <font color="#FF0000">* </font></td> </tr> <tr> <td width="37%"> <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">email</font></div> </td> <td colspan="3" width="63%"> <input type=text name=femail size=25 maxlength=60 > </td> </tr> <tr> <td width="37%"> <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">country</font></div> </td> <td colspan="3" width="63%"> <select name="country" size="1"> <option value="Argentina" selected>ARGENTINA</option> <option value="Australia">AUSTRALIA</option> <option value="Austria">AUSTRIA</option> <option value="Belgium">BELGIUM</option> <option value="Bolivia">BOLIVIA</option> <option value="Brazil">BRAZIL</option> <option value="Bulgaria">BULGARIA</option> <option value="Canada">CANADA</option> <option value="Chile">CHILE</option> <option value="China">CHINA</option> <option value="Columbia">COLUMBIA</option> <option value="Costa Rica">COSTA RICA</option> <option value="Croatia">CROATIA</option> <option value="Czech Republic">CZECH REPUBLIC</option> <option value="Denmark">DENMARK</option> <option value="Ecuador">ECUADOR</option> <option value="Egypt">EGYPT</option> <option value="Finland">FINLAND</option> <option value="France">FRANCE</option> <option value="Germany">GERMANY</option> <option value="Great Britain">GREAT BRITAIN</option> <option value="Greece">GREECE</option> <option value="Hong Kong">HONG KONG</option> <option value="Hungary">HUNGARY</option> <option value="India">INDIA</option> <option value="Ireland">IRELAND</option> <option value="Israel">ISRAEL</option> <option value="Italy">ITALY</option> <option value="Japan">JAPAN</option> <option value="Jordan">JORDAN</option> <option value="Korea">KOREA</option> <option value="Kuwait">KUWAIT</option> <option value="Luxembourg">LUXEMBOURG</option> <option value="Mexico">MEXICO</option> <option value="Monaco">MONACO</option> <option value="Netherlands">NETHERLANDS</option> <option value="New Zealand">NEW ZEALAND</option> <option value="Norway">NORWAY</option> <option value="Pakistan">PAKISTAN</option> <option value="Philippines">PHILIPPINES</option> <option value="Peru">PERU</option> <option value="Poland">POLAND</option> <option value="Portugal">PORTUGAL</option> <option value="Romania">ROMANIA</option> <option value="Russia">RUSSIA</option> <option value="Singapore">SINGAPORE</option> <option value="Slovakia">SLOVAKIA</option> <option value="Slovenia">SLOVENIA</option> <option value="South Africa">SOUTH AFRICA</option> <option value="Spain">SPAIN</option> <option value="Sweden">SWEDEN</option> <option value="Switzerland">SWITZERLAND</option> <option value="Turkey">TURKEY</option> <option value="United States">USA</option> <option value="Uraguay">URUGAY</option> <option value="Venezuela">VENZUELA</option> <option value="Yugoslavi">YUGOSLAVIA</option> </select> <font color="#FF0000">* </font></td> </tr> <tr> <td width="37%"> <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">controller</font></div> </td> <td colspan="3" width="63%"> <select name="controller" size="1"> <option value="JOYSTICK">JOYSTICK</option> <option value="KEYBOARD" selected>KEYBOARD</option> <option value="MICROSOFT">MICROSOFT WHEEL</option> <option value="GUILLEMOT">GUILLEMOT WHEEL</option> <option value="THRUSTMASTER">THRUSTMATER WHEEL</option> <option value="SAITEK">SAITEK WHEEL</option> <option value="ACT">ACT LAPS WHEEL</option> <option value="HYPERSTIMULATOR">HYPERSTIMULATOR</option> <option value="OTHER">OTHER</option> </select> </td> </tr> <tr> <td colspan="4" bgcolor="#999999"> <div align="center"> <input type="submit" name="Submit" value="Register"> </div> </td> </tr> <tr> <td colspan="4" bgcolor="#000000"> <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"></font> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <font size="1" color="#FFFFFF"> Hotlap&copy;2001 <? echo"$msg";?> </font> </font></div> </td> </tr> </table> </td> </tr> </table> </form> </body> </html> ?> |