Foutmelding bij inloggen admin + contactformulier
Ik krijg de volgende melding op de admin pagina:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/carteblanc/domains/carteblanchepw.be/public_html/common/db.php:25) in /home/carteblanc/domains/carteblanchepw.be/public_html/common/ac.php on line 5
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/carteblanc/domains/carteblanchepw.be/public_html/common/db.php:25) in /home/carteblanc/domains/carteblanchepw.be/public_html/common/ac.php on line 5
Weet iemand wat dit betekend ?
Hierbij de code van de pagina db.php:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
$dbhost = "localhost";
$db = "carteblanc_carte";
$dbuser = "c";
$dbpass = "w";
function dbConnect($db="") {
global $dbhost, $dbuser, $dbpass;
$dbcnx = mysql_connect("$localhost", "$dbuser", "$dbpass")
or die(mysql_error());
if ($db!="" and !mysql_select_db($db))
die(mysql_error());
return $dbcnx;
}
?>
$dbhost = "localhost";
$db = "carteblanc_carte";
$dbuser = "c";
$dbpass = "w";
function dbConnect($db="") {
global $dbhost, $dbuser, $dbpass;
$dbcnx = mysql_connect("$localhost", "$dbuser", "$dbpass")
or die(mysql_error());
if ($db!="" and !mysql_select_db($db))
die(mysql_error());
return $dbcnx;
}
?>
En dit is de ac.php pagina
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
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
<?php // ac.php
include_once 'common.php';
include_once 'db.php';
session_start();
$uid = isset($_POST['uid']) ? $_POST['uid'] : $_SESSION['uid'];
$pwd = isset($_POST['pwd']) ? $_POST['pwd'] : $_SESSION['pwd'];
if(!isset($uid)) {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Carte Blanche Gent</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<script src="../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" src="../scripts/NoIEActivate.js"></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#660000" class="top" scope="col"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="238" class="logo" scope="col"><a href="home.php"><img src="../images/logo.jpg" alt="Logo Carte Blanche" width="196" height="119" border="0" /></a></td>
<td width="562" class="slogan" scope="col">Gastronomisch Restaurant in Gent </td>
</tr>
</table></td>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="209" bgcolor="#B01513" class="suggestie" scope="col"> </td>
<td width="591" class="content" scope="col">
<form method="post" action="<?=$_SERVER['PHP_SELF']?>">
<table width="100%">
<tr>
<td width="20%" class="contact"><p><strong>Gebruikersnaam</strong></p></td>
<td width="80%" class="contact"><input name="uid" type="text" class="contact" id="uid" size="20" maxlength="20"></td>
</tr>
<tr>
<td class="contact"><strong>Wachtwoord</strong></td>
<td class="contact"><input name="pwd" type="password" class="contact" id="pwd" size="20" maxlength="20"></td>
</tr>
<tr>
<td class="form"> </td>
<td class="contact"><input name="submit" type="submit" class="button" value="Aanmelden"><br /></td>
</tr>
</table>
</form>
</td>
</tr>
</table></th>
</tr>
<tr>
<th bgcolor="#FFFFFF" scope="row"> </th>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer" scope="col"><a href="http://www.webpunt.be" title="Webpunt.be - Kerkstraat 69 - 9270 Laarne - Belgie Email: [email protected]
Domeinaam - Hosting - Webdesign - Nod32
Smart Security - Eset officieel verdeler" target="_blank" class="infobottom">Hosting & Domeinnaam door Webpunt.be</a></td>
</tr>
</table></th>
</tr>
</table>
</body>
</html>
<?php
exit;
}
$_SESSION['uid'] = $uid;
$_SESSION['pwd'] = $pwd;
dbconnect('carteblanc_carte');
$sql = "SELECT username, password FROM admin WHERE
username = '$uid' AND password = '$pwd'";
$result = mysql_query($sql);
if (!$result) {
error('Een databasefout is opgetreden bij het checken van je '.
'login details.\\nIndien dit probleem zich herhaalt '.
'contacteer dan [email protected].');
}
if (mysql_num_rows($result) == 0) {
unset($_SESSION['uid']);
unset($_SESSION['pwd']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Carte Blanche Gent</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<script src="../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" src="../scripts/NoIEActivate.js"></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#660000" class="top" scope="col"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="238" class="logo" scope="col"><a href="home.php"><img src="../images/logo.jpg" alt="Logo Carte Blanche" width="196" height="119" border="0" /></a></td>
<td width="562" class="slogan" scope="col">Gastronomisch Restaurant in Gent </td>
</tr>
</table></td>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="209" bgcolor="#B01513" class="suggestie" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><img src="../images/suggesties_top.jpg" width="220" height="17" /></th>
</tr>
<tr>
<th bgcolor="#3D0101" scope="row"><hr />
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p></th>
</tr>
<tr>
<th scope="row"><img src="../images/suggesties_bottom.jpg" width="220" height="18" /></th>
</tr>
</table></td>
<td width="591" class="content" scope="col">
<p> </p><p>Aanmelden is mislukt, <a href="../cms/index.php">probeer even opnieuw</a></p><p> </p>
</td>
</tr>
</table></th>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer" scope="col"></td>
</tr>
</table></th>
</tr>
</table>
</body>
</html>
<?php exit; }
$user = mysql_result($result,0,'username');
$pwd = mysql_result($result,0,'password');
?>
include_once 'common.php';
include_once 'db.php';
session_start();
$uid = isset($_POST['uid']) ? $_POST['uid'] : $_SESSION['uid'];
$pwd = isset($_POST['pwd']) ? $_POST['pwd'] : $_SESSION['pwd'];
if(!isset($uid)) {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Carte Blanche Gent</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<script src="../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" src="../scripts/NoIEActivate.js"></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#660000" class="top" scope="col"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="238" class="logo" scope="col"><a href="home.php"><img src="../images/logo.jpg" alt="Logo Carte Blanche" width="196" height="119" border="0" /></a></td>
<td width="562" class="slogan" scope="col">Gastronomisch Restaurant in Gent </td>
</tr>
</table></td>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="209" bgcolor="#B01513" class="suggestie" scope="col"> </td>
<td width="591" class="content" scope="col">
<form method="post" action="<?=$_SERVER['PHP_SELF']?>">
<table width="100%">
<tr>
<td width="20%" class="contact"><p><strong>Gebruikersnaam</strong></p></td>
<td width="80%" class="contact"><input name="uid" type="text" class="contact" id="uid" size="20" maxlength="20"></td>
</tr>
<tr>
<td class="contact"><strong>Wachtwoord</strong></td>
<td class="contact"><input name="pwd" type="password" class="contact" id="pwd" size="20" maxlength="20"></td>
</tr>
<tr>
<td class="form"> </td>
<td class="contact"><input name="submit" type="submit" class="button" value="Aanmelden"><br /></td>
</tr>
</table>
</form>
</td>
</tr>
</table></th>
</tr>
<tr>
<th bgcolor="#FFFFFF" scope="row"> </th>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer" scope="col"><a href="http://www.webpunt.be" title="Webpunt.be - Kerkstraat 69 - 9270 Laarne - Belgie Email: [email protected]
Domeinaam - Hosting - Webdesign - Nod32
Smart Security - Eset officieel verdeler" target="_blank" class="infobottom">Hosting & Domeinnaam door Webpunt.be</a></td>
</tr>
</table></th>
</tr>
</table>
</body>
</html>
<?php
exit;
}
$_SESSION['uid'] = $uid;
$_SESSION['pwd'] = $pwd;
dbconnect('carteblanc_carte');
$sql = "SELECT username, password FROM admin WHERE
username = '$uid' AND password = '$pwd'";
$result = mysql_query($sql);
if (!$result) {
error('Een databasefout is opgetreden bij het checken van je '.
'login details.\\nIndien dit probleem zich herhaalt '.
'contacteer dan [email protected].');
}
if (mysql_num_rows($result) == 0) {
unset($_SESSION['uid']);
unset($_SESSION['pwd']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Carte Blanche Gent</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<script src="../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" src="../scripts/NoIEActivate.js"></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#660000" class="top" scope="col"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="238" class="logo" scope="col"><a href="home.php"><img src="../images/logo.jpg" alt="Logo Carte Blanche" width="196" height="119" border="0" /></a></td>
<td width="562" class="slogan" scope="col">Gastronomisch Restaurant in Gent </td>
</tr>
</table></td>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="209" bgcolor="#B01513" class="suggestie" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><img src="../images/suggesties_top.jpg" width="220" height="17" /></th>
</tr>
<tr>
<th bgcolor="#3D0101" scope="row"><hr />
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p></th>
</tr>
<tr>
<th scope="row"><img src="../images/suggesties_bottom.jpg" width="220" height="18" /></th>
</tr>
</table></td>
<td width="591" class="content" scope="col">
<p> </p><p>Aanmelden is mislukt, <a href="../cms/index.php">probeer even opnieuw</a></p><p> </p>
</td>
</tr>
</table></th>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer" scope="col"></td>
</tr>
</table></th>
</tr>
</table>
</body>
</html>
<?php exit; }
$user = mysql_result($result,0,'username');
$pwd = mysql_result($result,0,'password');
?>
Alvast bedankt voor de hulp, op de andere pagina is het bijna hetzelfde, maar eerstdit oplossen
Gewijzigd op 31/03/2011 13:25:21 door Karel chakar
Over je probleem:
db.php op lijn 25, daar staat output.
Overigens voor je wachtwoorden in je database te encrypten met md5() of beter zelfs, sha1...
Gewijzigd op 31/03/2011 13:16:02 door - Ariën -
Dus dat is niet alles, of er staat een enter in.
Je kan ook de ?> weglaten, zo voorkom je ook vaak dat je per ongeluk die meldingen krijgt, terwijl je uren zit te zoeken naar output...
En om je nog even te herinneren:
HAAL JE MYSQL INLOGGEGEVENS UIT JE BERICHT, PAS DEZE DIRECT AAN NAAR WAT ANDERS.
IEDEREEN KAN NU TOEGANG KRIJGEN TOT JE PHPMYADMIN EN JE DATABASE/SITE VERNACHELEN.
NIET SLIM OM DEZE ROND TE STROOIEN, WIE WEET HEEFT GOOGLE HET AL GEINDEXEERD.
Gewijzigd op 31/03/2011 13:19:00 door - Ariën -
zie hier voorbeeld
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
$dbhost = "localhost";
$db = "carteblanc_carte";
$dbuser = "......";
$dbpass = "......";
function dbConnect($db="") {
global $dbhost, $dbuser, $dbpass;
$dbcnx = mysql_connect("$localhost", "$dbuser", "$dbpass")
or die(mysql_error());
if ($db!="" and !mysql_select_db($db))
die(mysql_error());
return $dbcnx;
}
?>
$dbhost = "localhost";
$db = "carteblanc_carte";
$dbuser = "......";
$dbpass = "......";
function dbConnect($db="") {
global $dbhost, $dbuser, $dbpass;
$dbcnx = mysql_connect("$localhost", "$dbuser", "$dbpass")
or die(mysql_error());
if ($db!="" and !mysql_select_db($db))
die(mysql_error());
return $dbcnx;
}
?>
Variabelen horen overigens BUITEN quotes.
En pas direct je beginpost eens aan.
Gewijzigd op 31/03/2011 13:22:54 door - Ariën -
Bedankt
Ik zal nu de fout nakijken bij het contactformulier en deze posten, ok
Gewijzigd op 31/03/2011 13:26:14 door - Ariën -
Foutmelding:
Notice: Undefined variable: localhost in /home/carteblanc/domains/carteblanchepw.be/public_html/common/db.php on line 11
Hier contact.php pagina
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
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
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
<?php
include 'common/common.php';
include 'common/db.php';
if (!isset($_POST['submit'])):
?>
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
ob_start();
session_start();
// Config Gedeelte
$cfg['url'] = "http://www.carteblanchepw.be/contact2.php";// Site waarnaar je terug gaat als je een bericht hebt achtergelaten
$cfg['naam'] = ""; // Webmaster naam
$cfg['email'] = ""; // Webmaster E-mail
$cfg['spam'] = 1; // Anti Spam Tijd in Minuten ( Voer "0" om de Spam Beveiliging uit te zetten )
$cfg['text'] = TRUE; // Bij Fout Text Rood maken ( TRUE voor aan, FALSE voor uit )
$cfg['input'] = TRUE; // Bij Fout Border om Vakje Rood maken ( TRUE voor aan, FALSE voor uit )
$cfg['HTML'] = TRUE; // Een HTML email ( TRUE voor aan, FALSE voor uit )
$cfg['CAPTCHA'] = FALSE; // CAPTCHA ( TRUE voor aan, FALSE voor uit )
// Hieronder niks meer veranderen
// E-mail Checker / Validator
function checkmail($email)
{
if(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$", $email))
{
return TRUE;
}
return FALSE;
}
$formulier = TRUE;
if(!isset($_COOKIE['formulier']))
{
if(isset($_POST['wis']) && ($_SERVER['REQUEST_METHOD'] == "POST"))
{
foreach($_POST as $key => $value)
{
unset($value);
}
header("Location: ".$_SERVER['PHP_SELF']."");
}
if(isset($_POST['verzenden']) && ($_SERVER['REQUEST_METHOD'] == "POST"))
{
$aFout = array();
$naam = trim($_POST['naam']);
$email = trim($_POST['email']);
if($cfg['CAPTCHA'])
{
$code = $_POST['code'];
}
if(empty($naam) || (strlen($naam) < 3) || eregi("[<>]", $naam) )
{
$aFout[] = "Er is geen naam ingevuld.";
unset($naam);
$fout['text']['naam'] = TRUE;
$fout['input']['naam'] = TRUE;
}
if(empty($email))
{
$aFout[] = "Er is geen e-mail adres ingevuld.";
unset($email);
$fout['text']['email'] = TRUE;
$fout['input']['email'] = TRUE;
}
elseif(checkmail($email) == 0)
// Wanneer je PHP 5.2 > gebruikt
//elseif(!filter_var($email, FILTER_VALIDATE_EMAIL))
{
$aFout[] = "Er is geen correct e-mail adres ingevuld.";
unset($email);
$fout['text']['email'] = TRUE;
$fout['input']['email'] = TRUE;
}
if($cfg['CAPTCHA'])
{
if(strtoupper($code) != $_SESSION['captcha_code'])
{
$aFout[] = "Er is geen correcte code ingevuld.";
$fout['text']['code'] = TRUE;
$fout['input']['code'] = TRUE;
}
}
if(!$cfg['text'])
{
unset($fout['text']);
}
if(!$cfg['input'])
{
unset($fout['input']);
}
if(!empty( $aFout ))
{
$errors = '
<div id="errors">
<ul>';
foreach($aFout as $sFout)
{
$errors .= " <li>".$sFout."</li>\n";
}
$errors .= "</ul>
</div>";
}
else
{
$formulier = FALSE;
if($cfg['HTML'])
{
// Headers
$headers = "From: \"Carte Blanche\" <".$cfg['email'].">\r\n";
$headers .= "Reply-To: \"".$naam."\" <".$email.">\n";
$headers .= "Return-Path: Mail-Error <".$cfg['email'].">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Transfer-Encoding: 8bit\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$bericht = '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link href="../CSS/web-hosting.css" rel="stylesheet" type="text/css" />
</head>
<body>
<br />
<b>Naam:</b> '.$naam.'<br />
<b>Email:</b> <a href="mailto:'.$email.'">'.$email.'</a><br />
<br />
<b></b><br />
'.$bericht.'
<br />
--------------------------------------------------------------------------<br />
<b>Datum:</b> '.date("d-m-Y @ H:i:s").'<br />
<b>IP:</b> <a href=\"http://sunny.nic.com/cgi-bin/whois?domain='.$_SERVER['REMOTE_ADDR'].'\">'.$_SERVER['REMOTE_ADDR'].'</a><br />
<b>Host:</b> '.gethostbyaddr($_SERVER['REMOTE_ADDR']).'<br />
</body>
</html>';
}
else
{
$bericht_wrap = wordwrap ($bericht, 40, "\n", 1);
// Headers
$headers = "From: \"Inschrijven Nieuwsbrief\" <".$cfg['email'].">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset='iso-8859-1'\n";
// Bericht
$message = "Naam: ".$naam." \n";
$message .= "E-mail: ".$email." \n";
$message .= "\n".$bericht_wrap." \n ";
$message .= " \n ";
$message .= "Datum: ".date("d-m-Y H:i:s")." \n";
$message .= "------------------------------------------------------- \n ";
$message .= "IP: ".$_SERVER['REMOTE_ADDR']." \n ";
$message .= "Host: ".gethostbyaddr($_SERVER['REMOTE_ADDR'])." \n ";
}
if(mail($cfg['email'], "Inschrijven Nieuwsbrief ".$onderwerp, $bericht, $headers))
{
if(isset($_POST['stuurkopie']))
{
$headers = "From: \"Inschrijven Nieuwsbrief\" <".$email.">\r\n";
$headers .= "Reply-To: \"".$naam."\" <".$email.">\n";
$headers .= "Return-Path: Mail-Error <".$email.">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Transfer-Encoding: 8bit\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
mail($email, "[Contact] ".$onderwerp, $bericht, $headers);
}
unset($naam, $email, $onderwerp, $bericht);
setcookie("formulier", 1, time() + ( $cfg['spam'] * 60 ) );
echo "
<p>
Uw bericht is succesvol verzonden, er word zo snel mogelijk gereageerd.<br />
<br />
Met vriendelijke groeten,<br />
<b>".$cfg['naam']."</b>
</p>
";
}
else
{
echo "Er is een fout opgetreden bij het verzenden van de email";
}
header("Location: " . $cfg['url']);
}
}
if($formulier)
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Inschrijven Nieuwsbrief</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" src="scripts/NoIEActivate.js"></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#660000" class="top" scope="col"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="238" class="logo" scope="col"><a href="home.php"><img src="images/logo.jpg" alt="Logo Carte Blanche" width="196" height="119" border="0" /></a></td>
<td width="562" class="slogan" scope="col">Gastronomisch Restaurant in Gent </td>
</tr>
</table></td>
</tr>
<tr>
<th bgcolor="#660000" class="header" scope="row">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','800','height','206','title','Carte Blanchee','src','flash/menu_fr','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/menu' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="800" height="206" title="Carte Blanche">
<param name="movie" value="flash/menu.swf" />
<param name="quality" value="high" />
<embed src="flash/menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="206"></embed>
</object>
</noscript>
</th>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="209" bgcolor="#B01513" class="suggestie" scope="col"><p> </p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><img src="images/suggesties_top.jpg" width="220" height="37" /></th>
</tr>
<tr>
<th bgcolor="#3D0101" class="sugg_content" scope="row"><hr />
<br />
<?php
//Inlezen van de suggesties
//Connect to Database
dbconnect('carteblanc_carte');
//Fetch suggestie
$sql = @mysql_query("SELECT * FROM suggesties");
//Catch error
if (!$sql) {
echo("<p>Fout bij het opladen van de suggesties: " . mysql_error() . "</p>");
exit();
}
//retrieve review information
while ($row = mysql_fetch_array($sql)) {
$suggesties = nl2br($row['suggesties']);
echo "$suggesties";
}
?></th>
</tr>
<tr>
<th scope="row"><img src="images/suggesties_bottom.jpg" width="220" height="18" /></th>
</tr>
</table></td>
<td width="591" class="content" scope="col"><h2>Contact</h2>
<p> </p>
<p>Restaurant Carte Blanche P-W<br />
Martelaarslaan 321<br />
9000 Gent</p>
<p> </p>
<p>tel: +32 (0) 9 233 28 08<br />
gsm: +32 (0) 478 54 05 12</p>
<p> </p>
<p>[email protected]</a><br />
<p> </p>
<p>Reservaties enkel telefonisch, dit om dubbele reservaties te vermijden.</p>
<p> </p>
<p>Wilt u op de hoogte blijven? Meldt u dan aan voor onze nieuwsbrief:</p>
<p> </p>
<table width="100%" height="100%" border="0">
<tr>
<td><div align=left>
<?php
if(isset($errors)) {
echo $errors;
}
?>
<form method="post" action="<?php $_SERVER['PHP_SELF']; ?>">
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td width="17%" scope="col" height="23px"><label class="contact" <?php if(isset($fout['text']['naam'])) { echo 'class="fout"'; } ?>>Naam</label></td>
<td><input name="naam" type="text" class="contact" scope="col" id="naam" value="<?php if (!empty($naam)) { echo stripslashes($naam); } ?>" size="50" maxlength="255" input <?php if(isset($fout['input']['naam'])) { echo 'class="fout"'; } ?> /></td>
</tr>
<tr>
<td width="17%" scope="col" height="23px"><label class="contact" <?php if(isset($fout['text']['email'])) { echo 'class="fout"'; } ?>>Email</label></td>
<td valign="bottom"><input name="email" type="text" class="contact" scope="col" id="email" value="<?php if (!empty($email)) { echo stripslashes($email); } ?>" size="50" maxlength="255" input <?php if(isset($fout['input']['email'])) { echo 'class="fout"'; } ?> /></td>
</tr>
<tr>
<td width="17%"><?php
if($cfg['CAPTCHA'])
{
?>
<span>Code:<img src="../images/blank.gif" width="20" height="1"><img src="captcha.php" alt="" /></span></td>
<td>
<input type="text" id="code" name="code" maxlength="4" size="4" <?php if(isset($fout['input']['code'])) { echo 'class="captcha fout"'; } ?> />
<?php
}
?></td>
</tr>
<tr>
<td></td>
<td height="30px">
<input name="verzenden" type="submit" class="button" id="verzenden" value="Inschrijven" /></td>
</tr>
</table>
</form></div></td>
</tr>
</table>
</td>
</tr>
</table></th>
</tr>
<tr>
<th bgcolor="#FFFFFF" scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle" class="links" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="15%" scope="col"><a href="http://www.33masters.com"><img src="images/33koks.jpg" alt="33 Meesterkoks" width="71" height="83" border="0" /></a></th>
<th width="20%" scope="col"><a href="http://www.culibel.be"><img src="images/culibel.jpg" alt="Culibel" width="114" height="50" border="0" /></a></th>
<th width="15%" scope="col"><a href="http://www.vlaamse-sommeliers.be"><img src="images/vlaamsesommeliers_small.jpg" width="53" height="70" border="0" /></a></th>
<th width="26%" scope="col"><a href="http://www.jokeleuridan.be"><img src="images/joke.jpg" alt="Fotografie Joke Leuridan" width="180" height="43" border="0" /></a></th>
<th width="24%" scope="col"><a href="http://www.kristofnotte.be"><img src="images/kristofnotte.jpg" alt="Fotografie Kristof Notte" width="164" height="74" border="0" /></a></th>
</tr>
</table>
</td>
</tr>
</table></th>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer" scope="col"></td>
</tr>
</table></th>
</tr>
</table>
</body>
</html>
<?php
}
}
else
{
echo "
<p>
U kunt maar eens in de ".$cfg['spam']." minuten een e-mail versturen!<br />
U wordt nu automatisch doorgestuurd.
</p>";
header("Location: " . $cfg['url2']);
}
?>
<?php
endif;
?>
include 'common/common.php';
include 'common/db.php';
if (!isset($_POST['submit'])):
?>
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
ob_start();
session_start();
// Config Gedeelte
$cfg['url'] = "http://www.carteblanchepw.be/contact2.php";// Site waarnaar je terug gaat als je een bericht hebt achtergelaten
$cfg['naam'] = ""; // Webmaster naam
$cfg['email'] = ""; // Webmaster E-mail
$cfg['spam'] = 1; // Anti Spam Tijd in Minuten ( Voer "0" om de Spam Beveiliging uit te zetten )
$cfg['text'] = TRUE; // Bij Fout Text Rood maken ( TRUE voor aan, FALSE voor uit )
$cfg['input'] = TRUE; // Bij Fout Border om Vakje Rood maken ( TRUE voor aan, FALSE voor uit )
$cfg['HTML'] = TRUE; // Een HTML email ( TRUE voor aan, FALSE voor uit )
$cfg['CAPTCHA'] = FALSE; // CAPTCHA ( TRUE voor aan, FALSE voor uit )
// Hieronder niks meer veranderen
// E-mail Checker / Validator
function checkmail($email)
{
if(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$", $email))
{
return TRUE;
}
return FALSE;
}
$formulier = TRUE;
if(!isset($_COOKIE['formulier']))
{
if(isset($_POST['wis']) && ($_SERVER['REQUEST_METHOD'] == "POST"))
{
foreach($_POST as $key => $value)
{
unset($value);
}
header("Location: ".$_SERVER['PHP_SELF']."");
}
if(isset($_POST['verzenden']) && ($_SERVER['REQUEST_METHOD'] == "POST"))
{
$aFout = array();
$naam = trim($_POST['naam']);
$email = trim($_POST['email']);
if($cfg['CAPTCHA'])
{
$code = $_POST['code'];
}
if(empty($naam) || (strlen($naam) < 3) || eregi("[<>]", $naam) )
{
$aFout[] = "Er is geen naam ingevuld.";
unset($naam);
$fout['text']['naam'] = TRUE;
$fout['input']['naam'] = TRUE;
}
if(empty($email))
{
$aFout[] = "Er is geen e-mail adres ingevuld.";
unset($email);
$fout['text']['email'] = TRUE;
$fout['input']['email'] = TRUE;
}
elseif(checkmail($email) == 0)
// Wanneer je PHP 5.2 > gebruikt
//elseif(!filter_var($email, FILTER_VALIDATE_EMAIL))
{
$aFout[] = "Er is geen correct e-mail adres ingevuld.";
unset($email);
$fout['text']['email'] = TRUE;
$fout['input']['email'] = TRUE;
}
if($cfg['CAPTCHA'])
{
if(strtoupper($code) != $_SESSION['captcha_code'])
{
$aFout[] = "Er is geen correcte code ingevuld.";
$fout['text']['code'] = TRUE;
$fout['input']['code'] = TRUE;
}
}
if(!$cfg['text'])
{
unset($fout['text']);
}
if(!$cfg['input'])
{
unset($fout['input']);
}
if(!empty( $aFout ))
{
$errors = '
<div id="errors">
<ul>';
foreach($aFout as $sFout)
{
$errors .= " <li>".$sFout."</li>\n";
}
$errors .= "</ul>
</div>";
}
else
{
$formulier = FALSE;
if($cfg['HTML'])
{
// Headers
$headers = "From: \"Carte Blanche\" <".$cfg['email'].">\r\n";
$headers .= "Reply-To: \"".$naam."\" <".$email.">\n";
$headers .= "Return-Path: Mail-Error <".$cfg['email'].">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Transfer-Encoding: 8bit\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$bericht = '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link href="../CSS/web-hosting.css" rel="stylesheet" type="text/css" />
</head>
<body>
<br />
<b>Naam:</b> '.$naam.'<br />
<b>Email:</b> <a href="mailto:'.$email.'">'.$email.'</a><br />
<br />
<b></b><br />
'.$bericht.'
<br />
--------------------------------------------------------------------------<br />
<b>Datum:</b> '.date("d-m-Y @ H:i:s").'<br />
<b>IP:</b> <a href=\"http://sunny.nic.com/cgi-bin/whois?domain='.$_SERVER['REMOTE_ADDR'].'\">'.$_SERVER['REMOTE_ADDR'].'</a><br />
<b>Host:</b> '.gethostbyaddr($_SERVER['REMOTE_ADDR']).'<br />
</body>
</html>';
}
else
{
$bericht_wrap = wordwrap ($bericht, 40, "\n", 1);
// Headers
$headers = "From: \"Inschrijven Nieuwsbrief\" <".$cfg['email'].">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset='iso-8859-1'\n";
// Bericht
$message = "Naam: ".$naam." \n";
$message .= "E-mail: ".$email." \n";
$message .= "\n".$bericht_wrap." \n ";
$message .= " \n ";
$message .= "Datum: ".date("d-m-Y H:i:s")." \n";
$message .= "------------------------------------------------------- \n ";
$message .= "IP: ".$_SERVER['REMOTE_ADDR']." \n ";
$message .= "Host: ".gethostbyaddr($_SERVER['REMOTE_ADDR'])." \n ";
}
if(mail($cfg['email'], "Inschrijven Nieuwsbrief ".$onderwerp, $bericht, $headers))
{
if(isset($_POST['stuurkopie']))
{
$headers = "From: \"Inschrijven Nieuwsbrief\" <".$email.">\r\n";
$headers .= "Reply-To: \"".$naam."\" <".$email.">\n";
$headers .= "Return-Path: Mail-Error <".$email.">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Transfer-Encoding: 8bit\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
mail($email, "[Contact] ".$onderwerp, $bericht, $headers);
}
unset($naam, $email, $onderwerp, $bericht);
setcookie("formulier", 1, time() + ( $cfg['spam'] * 60 ) );
echo "
<p>
Uw bericht is succesvol verzonden, er word zo snel mogelijk gereageerd.<br />
<br />
Met vriendelijke groeten,<br />
<b>".$cfg['naam']."</b>
</p>
";
}
else
{
echo "Er is een fout opgetreden bij het verzenden van de email";
}
header("Location: " . $cfg['url']);
}
}
if($formulier)
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Inschrijven Nieuwsbrief</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" src="scripts/NoIEActivate.js"></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#660000" class="top" scope="col"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="238" class="logo" scope="col"><a href="home.php"><img src="images/logo.jpg" alt="Logo Carte Blanche" width="196" height="119" border="0" /></a></td>
<td width="562" class="slogan" scope="col">Gastronomisch Restaurant in Gent </td>
</tr>
</table></td>
</tr>
<tr>
<th bgcolor="#660000" class="header" scope="row">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','800','height','206','title','Carte Blanchee','src','flash/menu_fr','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/menu' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="800" height="206" title="Carte Blanche">
<param name="movie" value="flash/menu.swf" />
<param name="quality" value="high" />
<embed src="flash/menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="206"></embed>
</object>
</noscript>
</th>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="209" bgcolor="#B01513" class="suggestie" scope="col"><p> </p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><img src="images/suggesties_top.jpg" width="220" height="37" /></th>
</tr>
<tr>
<th bgcolor="#3D0101" class="sugg_content" scope="row"><hr />
<br />
<?php
//Inlezen van de suggesties
//Connect to Database
dbconnect('carteblanc_carte');
//Fetch suggestie
$sql = @mysql_query("SELECT * FROM suggesties");
//Catch error
if (!$sql) {
echo("<p>Fout bij het opladen van de suggesties: " . mysql_error() . "</p>");
exit();
}
//retrieve review information
while ($row = mysql_fetch_array($sql)) {
$suggesties = nl2br($row['suggesties']);
echo "$suggesties";
}
?></th>
</tr>
<tr>
<th scope="row"><img src="images/suggesties_bottom.jpg" width="220" height="18" /></th>
</tr>
</table></td>
<td width="591" class="content" scope="col"><h2>Contact</h2>
<p> </p>
<p>Restaurant Carte Blanche P-W<br />
Martelaarslaan 321<br />
9000 Gent</p>
<p> </p>
<p>tel: +32 (0) 9 233 28 08<br />
gsm: +32 (0) 478 54 05 12</p>
<p> </p>
<p>[email protected]</a><br />
<p> </p>
<p>Reservaties enkel telefonisch, dit om dubbele reservaties te vermijden.</p>
<p> </p>
<p>Wilt u op de hoogte blijven? Meldt u dan aan voor onze nieuwsbrief:</p>
<p> </p>
<table width="100%" height="100%" border="0">
<tr>
<td><div align=left>
<?php
if(isset($errors)) {
echo $errors;
}
?>
<form method="post" action="<?php $_SERVER['PHP_SELF']; ?>">
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td width="17%" scope="col" height="23px"><label class="contact" <?php if(isset($fout['text']['naam'])) { echo 'class="fout"'; } ?>>Naam</label></td>
<td><input name="naam" type="text" class="contact" scope="col" id="naam" value="<?php if (!empty($naam)) { echo stripslashes($naam); } ?>" size="50" maxlength="255" input <?php if(isset($fout['input']['naam'])) { echo 'class="fout"'; } ?> /></td>
</tr>
<tr>
<td width="17%" scope="col" height="23px"><label class="contact" <?php if(isset($fout['text']['email'])) { echo 'class="fout"'; } ?>>Email</label></td>
<td valign="bottom"><input name="email" type="text" class="contact" scope="col" id="email" value="<?php if (!empty($email)) { echo stripslashes($email); } ?>" size="50" maxlength="255" input <?php if(isset($fout['input']['email'])) { echo 'class="fout"'; } ?> /></td>
</tr>
<tr>
<td width="17%"><?php
if($cfg['CAPTCHA'])
{
?>
<span>Code:<img src="../images/blank.gif" width="20" height="1"><img src="captcha.php" alt="" /></span></td>
<td>
<input type="text" id="code" name="code" maxlength="4" size="4" <?php if(isset($fout['input']['code'])) { echo 'class="captcha fout"'; } ?> />
<?php
}
?></td>
</tr>
<tr>
<td></td>
<td height="30px">
<input name="verzenden" type="submit" class="button" id="verzenden" value="Inschrijven" /></td>
</tr>
</table>
</form></div></td>
</tr>
</table>
</td>
</tr>
</table></th>
</tr>
<tr>
<th bgcolor="#FFFFFF" scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle" class="links" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="15%" scope="col"><a href="http://www.33masters.com"><img src="images/33koks.jpg" alt="33 Meesterkoks" width="71" height="83" border="0" /></a></th>
<th width="20%" scope="col"><a href="http://www.culibel.be"><img src="images/culibel.jpg" alt="Culibel" width="114" height="50" border="0" /></a></th>
<th width="15%" scope="col"><a href="http://www.vlaamse-sommeliers.be"><img src="images/vlaamsesommeliers_small.jpg" width="53" height="70" border="0" /></a></th>
<th width="26%" scope="col"><a href="http://www.jokeleuridan.be"><img src="images/joke.jpg" alt="Fotografie Joke Leuridan" width="180" height="43" border="0" /></a></th>
<th width="24%" scope="col"><a href="http://www.kristofnotte.be"><img src="images/kristofnotte.jpg" alt="Fotografie Kristof Notte" width="164" height="74" border="0" /></a></th>
</tr>
</table>
</td>
</tr>
</table></th>
</tr>
<tr>
<th scope="row"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer" scope="col"></td>
</tr>
</table></th>
</tr>
</table>
</body>
</html>
<?php
}
}
else
{
echo "
<p>
U kunt maar eens in de ".$cfg['spam']." minuten een e-mail versturen!<br />
U wordt nu automatisch doorgestuurd.
</p>";
header("Location: " . $cfg['url2']);
}
?>
<?php
endif;
?>
Enig idee ?
Gewijzigd op 31/03/2011 13:31:34 door karel chakar
Quote:
Foutmelding:
Notice: Undefined variable: localhost in /home/carteblanc/domains/carteblanchepw.be/public_html/common/db.php on line 11
Hier contact.php pagina
Notice: Undefined variable: localhost in /home/carteblanc/domains/carteblanchepw.be/public_html/common/db.php on line 11
Hier contact.php pagina
Ra ra ra, wat klopt er niet aan.
Gewijzigd op 31/03/2011 14:35:33 door - Ariën -
ob_start() staat op lijn 11.
Als ik deze ob_start() weglaat dan is het resultaat hetzelfde!
Wat zie ik niet ?
Wat aar wil vertellen is dat je contact.php geeft terwijl de fout zit in db.php...
Hier de code van db.php
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
$dbhost = "localhost";
$db = "carteblanc_carte";
$dbuser = "";
$dbpass = "";
function dbConnect($db="") {
global $dbhost, $dbuser, $dbpass;
$dbcnx = mysql_connect("$localhost", "$dbuser", "$dbpass")
or die(mysql_error());
if ($db!="" and !mysql_select_db($db))
die(mysql_error());
return $dbcnx;
}
[/]
$dbhost = "localhost";
$db = "carteblanc_carte";
$dbuser = "";
$dbpass = "";
function dbConnect($db="") {
global $dbhost, $dbuser, $dbpass;
$dbcnx = mysql_connect("$localhost", "$dbuser", "$dbpass")
or die(mysql_error());
if ($db!="" and !mysql_select_db($db))
die(mysql_error());
return $dbcnx;
}
[/]
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
$dbhost = "localhost";
$dbuser = "";
$dbpass = "";
function dbConnect($db="carteblanc_carte") {
global $dbhost, $dbuser, $dbpass;
if(!mysql_connect($dbhost, $dbuser, $dbpass))
{
trigger_error('Fout bij verbinden: '.mysql_error());
}
elseif(!mysql_select_db($db))
{
trigger_error('Fout bij selecteren database: '.mysql_error());
}
}
?>
$dbhost = "localhost";
$dbuser = "";
$dbpass = "";
function dbConnect($db="carteblanc_carte") {
global $dbhost, $dbuser, $dbpass;
if(!mysql_connect($dbhost, $dbuser, $dbpass))
{
trigger_error('Fout bij verbinden: '.mysql_error());
}
elseif(!mysql_select_db($db))
{
trigger_error('Fout bij selecteren database: '.mysql_error());
}
}
?>
Ik versta het niet goed, lles at ik deed is een database + website verhuizen van één server naar een andere.Op de 1ste website werkte ales perfect.
Nogmaals bedankt en tot horen !