Probleem met order formulier met mysql
http://85.17.200.148/~hostsite/xpress-host.eu/test2.php
een simpel scripje maar ik krijg volgende error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'land'),'webhosting','','domeinoptie','betaling')' at line 1
mijn scripts is :
heb al van alles geprobeerd en veranderd het lukt me niet
Code (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
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
<?php
mysql_connect('localhost','hostsite_***','******');
mysql_select_db('hostsite_***') or die (mysql_error());
if(isset($_POST['verzenden']))
{
$username = addslashes($_POST['username']);
$paswoord = addslashes($_POST['paswoord']);
$email = addslashes($_POST['email']);
$voornaam = addslashes($_POST['voornaam']);
$achternaam = addslashes($_POST['achternaam']);
$straatnaam = addslashes($_POST['straatnaam']);
$huisnummer = addslashes($_POST['huisnummer']);
$postcode = addslashes($_POST['postcode']);
$gemeente = addslashes($_POST['gemeente']);
$land = addslashes($_POST['land']);
$webhosting = addslashes($_POST['webhosting']);
$domein = addslashes($_POST['domein']);
$domeinoptie = addslashes($_POST['domeinoptie']);
$betaling = addslashes($_POST['betaling']);
mysql_query("INSERT INTO formulier (username,paswoord,email,voornaam,achternaam,huisnummer,postocode,gemeente,land,webhosting, domein,domeinoptie,betaling) VALUES ('".$username."','".$paswoord."','".$email."','".$voornaam."','".$achternaam.", '".$straatnaam."','".$huisnummer."','".$postcode."','".$gemeente."','".$land."'),'".$webhosting."','".$domein."','".$domeinoptie."','".$betaling."')") or die (mysql_error());
echo 'Je gegevens zijn succesvol in de database geplaatst je krijgt een email zodra je bestelling is verwerkt door een medewerker';
}
else
{
?>
<style type="text/css">
<!--
.style2 {color: #FFFFFF}
-->
</style>
<form action=" <?=$_SERVER['PHP_SELF']?> " method="POST">
<p>Account Gegevens :</p>
<p>Username:
<input type="text" name="username" id="username">
</p>
<p><br />
Paswoord:
<input type="password" name="paswoord" id="paswoord">
</p>
<p><br />
Emailadres
<input type="text" name="email" id="email">
</p>
<p>Persoonlijke gegevens : </p>
<p>Voornaam:<span class="style2">::</span>
<label>
<input type="text" name="voornaam" id="voornaam">
</label>
achternaam :
<label>
<input type="text" name="achternaam" id="achternaam">
</label>
</p>
<p>straatnaam :
<label>
<input type="text" name="straatnaam" id="straatnaam">
</label>
huisnummer :
<label>
<input type="text" name="huisnummer" id="huisnummer">
</label>
</p>
<p>Postcode :<span class="style2">:::</span>
<label>
<input type="text" name="postcode" id="postcode">
gemeente :<span class="style2">::::</span> </label>
<label>
<input type="text" name="gemeente" id="gemeente">
</label>
</p>
<p>Land : <span class="style2">::::::::::</span>
<select name="land" id="land">
<option>United States of America</option>
<option>United States Minor Outlying Islands</option>
<option>United Kingdom</option>
<option>Canada</option>
<option>Australia</option>
<option>New Zealand</option>
<option>Afghanistan</option>
<option>Albania</option>
<option>American Samoa</option>
<option>Andorra</option>
<option>Angola</option>
<option>Anguilla</option>
<option>Antarctica</option>
<option>Antigua and Barbuda</option>
<option>Argentina</option>
<option>Armenia</option>
<option>Aruba</option>
<option>Aruba</option>
<option>Austria</option>
<option>Austria</option>
<option>Azerbaijan</option>
<option>Bahamas</option>
<option>Bahrain</option>
<option>Barbados</option>
<option>Barbados</option>
<option>Belarus</option>
<option>Belgium</option>
<option>Belize</option>
<option>Benin</option>
<option>Bermuda</option>
<option>Bhutan</option>
<option>Bolivia</option>
<option>Bosnia and Herzegovina</option>
<option>Botswana</option>
<option>Bouvet Island</option>
<option>Brazil</option>
<option>British Indian Ocean Territory</option>
<option>Brunei Darussalam</option>
<option>Bulgaria</option>
<option>Burkina Faso</option>
<option>Burundi</option>
<option>Cambodia</option>
<option>Cameroon</option>
<option>Cape Verde</option>
<option>Cayman Islands</option>
<option>Central African Republic</option>
<option>Chad</option>
<option>Chile</option>
<option>China</option>
<option>Christmas Island</option>
<option>Cocos (Keeling) Islands</option>
<option>Colombia</option>
<option>Comoros</option>
<option>Congo</option>
<option>Cook Islands</option>
<option>Costa Rica</option>
<option>Cte d'Ivoire</option>
<option>Croatia</option>
<option>Cuba</option>
<option>Czech Republic</option>
<option>Denmark</option>
<option>Djibouti</option>
<option>Dominica</option>
<option>Dominican Republic</option>
<option>East Timor</option>
<option>Ecuador</option>
<option>Egypt</option>
<option>El salvador</option>
<option>Equatorial Guinea</option>
<option>Eritrea</option>
<option>Estonia</option>
<option>Ethiopia</option>
<option>Falkland Islands</option>
<option>Faroe Islands</option>
<option>Fiji</option>
<option>Finland</option>
<option>France</option>
<option>French Guiana</option>
<option>French Polynesia</option>
<option>French Southern Territories</option>
<option>Gabon</option>
<option>Gambia</option>
<option>Georgia</option>
<option>Ghana</option>
<option>Gibraltar</option>
<option>Greece</option>
<option>Greenland</option>
<option>Grenada</option>
<option>Guadeloupe</option>
<option>Guam</option>
<option>Guatemala</option>
<option>Guinea</option>
<option>Guinea-Bissau</option>
<option>Guyana</option>
<option>Haiti</option>
<option>Heard Island and McDonald Islands</option>
<option>Holy See (Vatican City State)</option>
<option>Honduras</option>
<option>Hungary</option>
<option>Iceland</option>
<option>India</option>
<option>Indonesia</option>
<option>Iran</option>
<option>Iraq</option>
<option>Ireland</option>
<option>Israel</option>
<option>Italy</option>
<option>Jamaica</option>
<option>Japan</option>
<option>Jordan</option>
<option>Kazakstan</option>
<option>Kenya</option>
<option>Kiribati</option>
<option>Kuwait</option>
<option>Kyrgystan</option>
<option>Lao</option>
<option>Latvia</option>
<option>Latvia</option>
<option>Lebanon</option>
<option>Lesotho</option>
<option>Libyan Arab Jamahiriya</option>
<option>Liechtenstein</option>
<option>Lithuania</option>
<option>Luxembourg</option>
<option>Macau</option>
<option>Macedonia (FYR)</option>
<option>Madagascar</option>
<option>Malawi</option>
<option>Malaysia</option>
<option>Maldives</option>
<option>Mali</option>
<option>Malta</option>
<option>Marshall Islands</option>
<option>Martinique</option>
<option>Mauritania</option>
<option>Mauritius</option>
<option>Mayotte</option>
<option>Mexico</option>
<option>Micronesia</option>
<option>Moldova</option>
<option>Monaco</option>
<option>Mongolia</option>
<option>Montserrat</option>
<option>Morocco</option>
<option>Mozambique</option>
<option>Mozambique</option>
<option>Myanmar</option>
<option>Namibia</option>
<option>Nauru</option>
<option>Nepal</option>
<option>Netherlands</option>
<option>Netherlands Antilles</option>
<option>Neutral Zone</option>
<option>New Caledonia</option>
<option>Nicaragua</option>
<option>Niger</option>
<option>Nigeria</option>
<option>Niue</option>
<option>Norfolk Island</option>
<option>North Korea</option>
<option>Northern Mariana Islands</option>
<option>Norway</option>
<option>Oman</option>
<option>Pakistan</option>
<option>Palau</option>
<option>Panama</option>
<option>Papua New Guinea</option>
<option>Paraguay</option>
<option>Peru</option>
<option>Philippines</option>
<option>Pitcairn</option>
<option>Poland</option>
<option>Portugal</option>
<option>Puerto Rico</option>
<option>Reunion</option>
<option>Romania</option>
<option>Russian Federation</option>
<option>Rwanda</option>
<option>Saint Helena</option>
<option>Saint Kitts and Nevis</option>
<option>Saint Lucia</option>
<option>Saint Pierre and Miquelon</option>
<option>Saint Vincent and the Grenadines</option>
<option>Samoa</option>
<option>San Marino</option>
<option>Sao Tome and Principe</option>
<option>Saudi Arabia</option>
<option>Senegal</option>
<option>Seychelles</option>
<option>Sierra Leone</option>
<option>Sierra Leone</option>
<option>Singapore</option>
<option>Slovakia</option>
<option>Slovenia</option>
<option>Solomon Islands</option>
<option>Somalia</option>
<option>South Africa</option>
<option>South Georgia</option>
<option>South Korea</option>
<option>Spain</option>
<option>Sri Lanka</option>
<option>Sudan</option>
<option>Sudan</option>
<option>Suriname</option>
<option>Svalbard and Jan Mayen Islands</option>
<option>Swaziland</option>
<option>Swaziland</option>
<option>Sweden</option>
<option>Switzerland</option>
<option>Switzerland</option>
<option>Syria</option>
<option>Syria</option>
<option>Taiwan</option>
<option>Tajikistan</option>
<option>Tanzania</option>
<option>Thailand</option>
<option>Togo</option>
<option>Tokelau</option>
<option>Tonga</option>
<option>Tonga</option>
<option>Trinidad and Tobago</option>
<option>Tunisia</option>
<option>Turkey</option>
<option>Turkmenistan</option>
<option>Turks and Caicos Islands</option>
<option>Tuvalu</option>
<option>Uganda</option>
<option>Ukraine</option>
<option>United Arab Emirates</option>
<option>Uruguay</option>
<option>Uzbekistan</option>
<option>Vanuatu</option>
<option>Venezuela</option>
<option>Viet Nam</option>
<option>Virgin Islands (British)</option>
<option>Virgin Islands (U.S.)</option>
<option>Wallis and Futuna Islands</option>
<option>Western Sahara</option>
<option>Yemen</option>
<option>Yugoslavia</option>
<option>Zaire</option>
<option>Zambia</option>
<option>Zimbabwe</option>
</select>
</p>
<p>Webhosting gegevens : </p>
<p>Webhosting:
<label>
<select name="webhosting" id="webhosting">
<option>Web Mini</option>
<option>Web Starter</option>
<option>Web Small Business</option>
<option>Web Medium Business</option>
<option>Web Big Business</option>
<option>Web Pro</option>
</select>
</label>
</p>
<p>Domeinaam:
<label>
<input type="text" name="domein" id="domein" />
</label>
</p>
<p>Opties :<span class="style2">:::::::::
<label> </label>
</span>
<label>
<select name="domeinoptie" id="domeinoptie">
<option>Registreer mijn domein</option>
<option>Verhuis mijn domein </option>
<option>Domein niet Registeren</option>
</select>
</label>
</p>
<p>Betaling met
<label>
<select name="betaling" id="betaling">
<option>Paypal</option>
<option>Bank overschrijving</option>
</select>
</label>
</p>
<p><label></label></p>
<p><br />
<input type="submit" name="verzenden" value="Plaats bestelling">
</p>
</form>
<?
}
?>
mysql_connect('localhost','hostsite_***','******');
mysql_select_db('hostsite_***') or die (mysql_error());
if(isset($_POST['verzenden']))
{
$username = addslashes($_POST['username']);
$paswoord = addslashes($_POST['paswoord']);
$email = addslashes($_POST['email']);
$voornaam = addslashes($_POST['voornaam']);
$achternaam = addslashes($_POST['achternaam']);
$straatnaam = addslashes($_POST['straatnaam']);
$huisnummer = addslashes($_POST['huisnummer']);
$postcode = addslashes($_POST['postcode']);
$gemeente = addslashes($_POST['gemeente']);
$land = addslashes($_POST['land']);
$webhosting = addslashes($_POST['webhosting']);
$domein = addslashes($_POST['domein']);
$domeinoptie = addslashes($_POST['domeinoptie']);
$betaling = addslashes($_POST['betaling']);
mysql_query("INSERT INTO formulier (username,paswoord,email,voornaam,achternaam,huisnummer,postocode,gemeente,land,webhosting, domein,domeinoptie,betaling) VALUES ('".$username."','".$paswoord."','".$email."','".$voornaam."','".$achternaam.", '".$straatnaam."','".$huisnummer."','".$postcode."','".$gemeente."','".$land."'),'".$webhosting."','".$domein."','".$domeinoptie."','".$betaling."')") or die (mysql_error());
echo 'Je gegevens zijn succesvol in de database geplaatst je krijgt een email zodra je bestelling is verwerkt door een medewerker';
}
else
{
?>
<style type="text/css">
<!--
.style2 {color: #FFFFFF}
-->
</style>
<form action=" <?=$_SERVER['PHP_SELF']?> " method="POST">
<p>Account Gegevens :</p>
<p>Username:
<input type="text" name="username" id="username">
</p>
<p><br />
Paswoord:
<input type="password" name="paswoord" id="paswoord">
</p>
<p><br />
Emailadres
<input type="text" name="email" id="email">
</p>
<p>Persoonlijke gegevens : </p>
<p>Voornaam:<span class="style2">::</span>
<label>
<input type="text" name="voornaam" id="voornaam">
</label>
achternaam :
<label>
<input type="text" name="achternaam" id="achternaam">
</label>
</p>
<p>straatnaam :
<label>
<input type="text" name="straatnaam" id="straatnaam">
</label>
huisnummer :
<label>
<input type="text" name="huisnummer" id="huisnummer">
</label>
</p>
<p>Postcode :<span class="style2">:::</span>
<label>
<input type="text" name="postcode" id="postcode">
gemeente :<span class="style2">::::</span> </label>
<label>
<input type="text" name="gemeente" id="gemeente">
</label>
</p>
<p>Land : <span class="style2">::::::::::</span>
<select name="land" id="land">
<option>United States of America</option>
<option>United States Minor Outlying Islands</option>
<option>United Kingdom</option>
<option>Canada</option>
<option>Australia</option>
<option>New Zealand</option>
<option>Afghanistan</option>
<option>Albania</option>
<option>American Samoa</option>
<option>Andorra</option>
<option>Angola</option>
<option>Anguilla</option>
<option>Antarctica</option>
<option>Antigua and Barbuda</option>
<option>Argentina</option>
<option>Armenia</option>
<option>Aruba</option>
<option>Aruba</option>
<option>Austria</option>
<option>Austria</option>
<option>Azerbaijan</option>
<option>Bahamas</option>
<option>Bahrain</option>
<option>Barbados</option>
<option>Barbados</option>
<option>Belarus</option>
<option>Belgium</option>
<option>Belize</option>
<option>Benin</option>
<option>Bermuda</option>
<option>Bhutan</option>
<option>Bolivia</option>
<option>Bosnia and Herzegovina</option>
<option>Botswana</option>
<option>Bouvet Island</option>
<option>Brazil</option>
<option>British Indian Ocean Territory</option>
<option>Brunei Darussalam</option>
<option>Bulgaria</option>
<option>Burkina Faso</option>
<option>Burundi</option>
<option>Cambodia</option>
<option>Cameroon</option>
<option>Cape Verde</option>
<option>Cayman Islands</option>
<option>Central African Republic</option>
<option>Chad</option>
<option>Chile</option>
<option>China</option>
<option>Christmas Island</option>
<option>Cocos (Keeling) Islands</option>
<option>Colombia</option>
<option>Comoros</option>
<option>Congo</option>
<option>Cook Islands</option>
<option>Costa Rica</option>
<option>Cte d'Ivoire</option>
<option>Croatia</option>
<option>Cuba</option>
<option>Czech Republic</option>
<option>Denmark</option>
<option>Djibouti</option>
<option>Dominica</option>
<option>Dominican Republic</option>
<option>East Timor</option>
<option>Ecuador</option>
<option>Egypt</option>
<option>El salvador</option>
<option>Equatorial Guinea</option>
<option>Eritrea</option>
<option>Estonia</option>
<option>Ethiopia</option>
<option>Falkland Islands</option>
<option>Faroe Islands</option>
<option>Fiji</option>
<option>Finland</option>
<option>France</option>
<option>French Guiana</option>
<option>French Polynesia</option>
<option>French Southern Territories</option>
<option>Gabon</option>
<option>Gambia</option>
<option>Georgia</option>
<option>Ghana</option>
<option>Gibraltar</option>
<option>Greece</option>
<option>Greenland</option>
<option>Grenada</option>
<option>Guadeloupe</option>
<option>Guam</option>
<option>Guatemala</option>
<option>Guinea</option>
<option>Guinea-Bissau</option>
<option>Guyana</option>
<option>Haiti</option>
<option>Heard Island and McDonald Islands</option>
<option>Holy See (Vatican City State)</option>
<option>Honduras</option>
<option>Hungary</option>
<option>Iceland</option>
<option>India</option>
<option>Indonesia</option>
<option>Iran</option>
<option>Iraq</option>
<option>Ireland</option>
<option>Israel</option>
<option>Italy</option>
<option>Jamaica</option>
<option>Japan</option>
<option>Jordan</option>
<option>Kazakstan</option>
<option>Kenya</option>
<option>Kiribati</option>
<option>Kuwait</option>
<option>Kyrgystan</option>
<option>Lao</option>
<option>Latvia</option>
<option>Latvia</option>
<option>Lebanon</option>
<option>Lesotho</option>
<option>Libyan Arab Jamahiriya</option>
<option>Liechtenstein</option>
<option>Lithuania</option>
<option>Luxembourg</option>
<option>Macau</option>
<option>Macedonia (FYR)</option>
<option>Madagascar</option>
<option>Malawi</option>
<option>Malaysia</option>
<option>Maldives</option>
<option>Mali</option>
<option>Malta</option>
<option>Marshall Islands</option>
<option>Martinique</option>
<option>Mauritania</option>
<option>Mauritius</option>
<option>Mayotte</option>
<option>Mexico</option>
<option>Micronesia</option>
<option>Moldova</option>
<option>Monaco</option>
<option>Mongolia</option>
<option>Montserrat</option>
<option>Morocco</option>
<option>Mozambique</option>
<option>Mozambique</option>
<option>Myanmar</option>
<option>Namibia</option>
<option>Nauru</option>
<option>Nepal</option>
<option>Netherlands</option>
<option>Netherlands Antilles</option>
<option>Neutral Zone</option>
<option>New Caledonia</option>
<option>Nicaragua</option>
<option>Niger</option>
<option>Nigeria</option>
<option>Niue</option>
<option>Norfolk Island</option>
<option>North Korea</option>
<option>Northern Mariana Islands</option>
<option>Norway</option>
<option>Oman</option>
<option>Pakistan</option>
<option>Palau</option>
<option>Panama</option>
<option>Papua New Guinea</option>
<option>Paraguay</option>
<option>Peru</option>
<option>Philippines</option>
<option>Pitcairn</option>
<option>Poland</option>
<option>Portugal</option>
<option>Puerto Rico</option>
<option>Reunion</option>
<option>Romania</option>
<option>Russian Federation</option>
<option>Rwanda</option>
<option>Saint Helena</option>
<option>Saint Kitts and Nevis</option>
<option>Saint Lucia</option>
<option>Saint Pierre and Miquelon</option>
<option>Saint Vincent and the Grenadines</option>
<option>Samoa</option>
<option>San Marino</option>
<option>Sao Tome and Principe</option>
<option>Saudi Arabia</option>
<option>Senegal</option>
<option>Seychelles</option>
<option>Sierra Leone</option>
<option>Sierra Leone</option>
<option>Singapore</option>
<option>Slovakia</option>
<option>Slovenia</option>
<option>Solomon Islands</option>
<option>Somalia</option>
<option>South Africa</option>
<option>South Georgia</option>
<option>South Korea</option>
<option>Spain</option>
<option>Sri Lanka</option>
<option>Sudan</option>
<option>Sudan</option>
<option>Suriname</option>
<option>Svalbard and Jan Mayen Islands</option>
<option>Swaziland</option>
<option>Swaziland</option>
<option>Sweden</option>
<option>Switzerland</option>
<option>Switzerland</option>
<option>Syria</option>
<option>Syria</option>
<option>Taiwan</option>
<option>Tajikistan</option>
<option>Tanzania</option>
<option>Thailand</option>
<option>Togo</option>
<option>Tokelau</option>
<option>Tonga</option>
<option>Tonga</option>
<option>Trinidad and Tobago</option>
<option>Tunisia</option>
<option>Turkey</option>
<option>Turkmenistan</option>
<option>Turks and Caicos Islands</option>
<option>Tuvalu</option>
<option>Uganda</option>
<option>Ukraine</option>
<option>United Arab Emirates</option>
<option>Uruguay</option>
<option>Uzbekistan</option>
<option>Vanuatu</option>
<option>Venezuela</option>
<option>Viet Nam</option>
<option>Virgin Islands (British)</option>
<option>Virgin Islands (U.S.)</option>
<option>Wallis and Futuna Islands</option>
<option>Western Sahara</option>
<option>Yemen</option>
<option>Yugoslavia</option>
<option>Zaire</option>
<option>Zambia</option>
<option>Zimbabwe</option>
</select>
</p>
<p>Webhosting gegevens : </p>
<p>Webhosting:
<label>
<select name="webhosting" id="webhosting">
<option>Web Mini</option>
<option>Web Starter</option>
<option>Web Small Business</option>
<option>Web Medium Business</option>
<option>Web Big Business</option>
<option>Web Pro</option>
</select>
</label>
</p>
<p>Domeinaam:
<label>
<input type="text" name="domein" id="domein" />
</label>
</p>
<p>Opties :<span class="style2">:::::::::
<label> </label>
</span>
<label>
<select name="domeinoptie" id="domeinoptie">
<option>Registreer mijn domein</option>
<option>Verhuis mijn domein </option>
<option>Domein niet Registeren</option>
</select>
</label>
</p>
<p>Betaling met
<label>
<select name="betaling" id="betaling">
<option>Paypal</option>
<option>Bank overschrijving</option>
</select>
</label>
</p>
<p><label></label></p>
<p><br />
<input type="submit" name="verzenden" value="Plaats bestelling">
</p>
</form>
<?
}
?>
Gewijzigd op 01/01/1970 01:00:00 door Matthias deckers
Code (php)
1
<?mysql_query("INSERT INTO formulier (username,paswoord,email,voornaam,achternaam,huisnummer,postocode,gemeente,land,webhosting, domein,domeinoptie,betaling) VALUES ('".$username."','".$paswoord."','".$email."','".$voornaam."','".$achternaam.", '".$straatnaam."','".$huisnummer."','".$postcode."','".$gemeente."','".$land."'),'".$webhosting."','".$domein."','".$domeinoptie."','".$betaling."')") or die (mysql_error()); ?>
je hebt postocode staan ipv postcode...
mm zou het daar alleen aan liggen zal eens testen zou wel stom zijn dan
En waar is de error checking? Je controleert helemaal niet of je query wel lukt.
ben maar een beginnertje
dit script heeft trouwen gewerkt toen ik nog maar paar veldne had nu niet meer
dan komt er dit o^p
echo 'Je gegevens zijn succesvol in de database geplaatst je krijgt een email zodra je bestelling is verwerkt door een medewerker';
}
else
Gewijzigd op 01/01/1970 01:00:00 door matthias deckers
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$sql = "
INSERT INTO tabelnaam
(
veld1,
veld2
)
VALUES
(
'" . mysql_real_escape_string ($_POST['veld1']) . "',
'" . mysql_real_escape_string ($_POST['veld2']) . "'
)
";
if (!mysql_query ($sql)) {
trigger_error (mysql_error ());
echo htmlentities ($sql);
}
else {
// query uitgevoerd
}
?>
$sql = "
INSERT INTO tabelnaam
(
veld1,
veld2
)
VALUES
(
'" . mysql_real_escape_string ($_POST['veld1']) . "',
'" . mysql_real_escape_string ($_POST['veld2']) . "'
)
";
if (!mysql_query ($sql)) {
trigger_error (mysql_error ());
echo htmlentities ($sql);
}
else {
// query uitgevoerd
}
?>
hij geeft de errors op die drop menukes van land , webhosting ,
Gewijzigd op 01/01/1970 01:00:00 door matthias deckers
Er staan geen values in je options. Zo wordt er nooit een waarde verzonden door je selects. En die error checking is echt belangrijk.
Code (php)
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
<select name="webhosting" id="webhosting">
<option value="webhosting">Web Mini</option>
<option value="webhosting">Web Starter</option>
<option value="webhosting">Web Small Business</option>
<option value="webhosting">Web Medium Business</option>
<option value="webhosting">Web Big Business</option>
<option value="webhosting">Web Pro</option>
</select>
<option value="webhosting">Web Mini</option>
<option value="webhosting">Web Starter</option>
<option value="webhosting">Web Small Business</option>
<option value="webhosting">Web Medium Business</option>
<option value="webhosting">Web Big Business</option>
<option value="webhosting">Web Pro</option>
</select>
ja weet dat belangrijk is maar dat zorgt er niert voor dat het script werkt of niet werkt
maar this gewoon raar ik heb dat nog nooit met die values gedaan mijn oude script werkt wel en is afgeleid van dit is juist zelfde met enkele aanpassingen
Quote:
ja weet dat belangrijk is maar dat zorgt er niert voor dat het script werkt of niet werkt
Als dat je criterium is, wordt het nooit wat.
Wat zie je als je dit bovenaan je script zet:
dan krijg ik nu dit
Array
(
[username] => test
[paswoord] => test
=> test
[voornaam] => hhhh
[achternaam] => hh
[straatnaam] => hh
[huisnummer] => hh
[postcode] => hhh
[gemeente] => hh
[land] => United States of America
[webhosting] => webhosting
[domein] => www.testing.nl
[domeinoptie] => Registreer mijn domein
[betaling] => Paypal
[verzenden] => Plaats bestelling
)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'hh','hh','hhh','hh','United States of America'),'webhosting','www.testing.nl','R' at line 1
edit:
ik zie toch dat ik niet wiest welke values heb terug aangepast zelfde als options genomen
Gewijzigd op 01/01/1970 01:00:00 door matthias deckers
As you can see staat er na 'USA' een ), die hoort daar niet.
er staat gewoon dti <option>United States of America</option>
In je query ;)
ik heb gewoon dit
id int(4) Nee auto_increment
username text latin1_swedish_ci Nee
paswoord text latin1_swedish_ci Nee
email text latin1_swedish_ci Nee
voornaam text latin1_swedish_ci Nee
achternaam text latin1_swedish_ci Nee
straatnaam text latin1_swedish_ci Nee
huisnummer text latin1_swedish_ci Nee
postcode text latin1_swedish_ci Nee
gemeente text latin1_swedish_ci Nee
land text latin1_swedish_ci Nee
webhosting text latin1_swedish_ci Nee
domein text latin1_swedish_ci Nee
domeinoptie text latin1_swedish_ci Nee
betaling text latin1_swedish_ci Nee
mm denk dat ik het een en ander nog niet door heb
In je INSERT-query staat na '".$land."' een ), die hoort daar niet.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'United States of America','Web Mini','','Registreer','paypal'' at line
van waar komt dit er dan nog tussen '' (Mini','','Registreer')
Code (php)
1
mysql_query("INSERT INTO formulier (username,paswoord,email,voornaam,achternaam,huisnummer,postcode,gemeente,land,webhosting, domein,domeinoptie,betaling) VALUES ('".$username."','".$paswoord."','".$email."','".$voornaam."','".$achternaam.", '".$straatnaam."','".$huisnummer."','".$postcode."','".$gemeente."','".$land."','".$webhosting."','".$domein."','".$domeinoptie."','".$betaling."'") or die (mysql_error());
$domein is leeg?
Array
(
[username] => j
[paswoord] => j
=> j
[voornaam] => j
[achternaam] => j
[straatnaam] => j
[huisnummer] => j
[postcode] => j
[gemeente] => j
[land] => United States of America
[webhosting] => Web Mini
[domein] => matthias.nl
[domeinoptie] => Registreer
[betaling] => paypal
[verzenden] => Plaats bestelling
)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'j','j','j','j','United States of America','Web Mini','matthias.nl','Registreer',' at line 1
weet niet wat verkeerd was maar het werkt perfect
Niet Bumpen::
Gewijzigd op 01/01/1970 01:00:00 door matthias deckers
naam."','".$achternaam.", '".$straat