Cannot modify header information
Pagina: « vorige 1 2 3 volgende »
Als je een spatie, enter of wat voor tekst dan ook naar de browser stuurt vóór header() of vóór session_start() e.d. krijg je de 'headers already start' error.
Ik moet toch eens meer tijd gaan steken in de zorgvuldigheid waarmee ik lees. Ik lees meestal ontiegelijk snel en zie daardoor de helft niet. Er staat "headers already sent".
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
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
<?php
function check_language()
{
// Bestaat de cookie met de language waarde (nl,en of de)
if (!isset($_COOKIE['language']))
{
require_once('languages/nl.php');
}
else
{
require_once('languages/'.$_COOKIE['language'].'.php');
}
}
function connect()
{
// Variabelen voor verbinging
$hostname = "localhost";
$database = "fairmania";
$username = "root";
$password = "";
// Verbinging met database maken
mysql_connect("$hostname","$username","$password");
mysql_select_db("$database");
}
function activate($mail)
{
$mail = base64_decode($mail);
$query = mysql_query("UPDATE `gebruikers` SET status = '1' WHERE email = '".$mail."'");
}
// Is het mailadres correct?
function validate_mail($mail)
{
if(!filter_var($mail, FILTER_VALIDATE_EMAIL))
{
$mail = 'false';
return $mail;
}
}
function createRandomPassword() {
$chars = "abcdefghijkmnopqrstuvwxyz023456789ABCDEFGHIJKMNOPQRSTUVXYZ023456789";
srand((double)microtime()*1000000);
$i = 0;
$pass = '' ;
while ($i <= 6) {
$num = rand() % 66;
$tmp = substr($chars, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}
function login_check($user,$pass)
{
$user = strip_tags($user);
$pass = md5(strip_tags($pass));
$query = mysql_query("SELECT id, status FROM `gebruikers` WHERE gebruikersnaam = '$user' AND wachtwoord = '$pass'");
if (!$query)
{
return ERROR;
}
else
{
if($row = mysql_fetch_assoc($query))
{
if ($row['status'] == 0)
{
return STATUS;
}
else
{
$_SESSION['id'] = $row['id'];
return LOGIN_TRUE;
}
}
else
{
return LOGIN_ERROR;
}
}
}
function info_user($info)
{
// Gegevens opvragen van de persoon met de id = $id
$query = mysql_query("SELECT ".$info." FROM `gebruikers` WHERE `id` = '".$_SESSION['id']."'");
$info_user = mysql_fetch_assoc($query);
// Return info_gebruiker
return $info_user[$info];
}
function coins($coins)
{
$coins = number_format($coins, 0, ',', '.').',-';
return $coins;
}
function number_rides()
{
$query = mysql_query("SELECT id FROM `at_gebruikers` WHERE `id` = '".$_SESSION['id']."'");
$number_rides = mysql_num_rows($query);
return $number_rides;
}
?>
function check_language()
{
// Bestaat de cookie met de language waarde (nl,en of de)
if (!isset($_COOKIE['language']))
{
require_once('languages/nl.php');
}
else
{
require_once('languages/'.$_COOKIE['language'].'.php');
}
}
function connect()
{
// Variabelen voor verbinging
$hostname = "localhost";
$database = "fairmania";
$username = "root";
$password = "";
// Verbinging met database maken
mysql_connect("$hostname","$username","$password");
mysql_select_db("$database");
}
function activate($mail)
{
$mail = base64_decode($mail);
$query = mysql_query("UPDATE `gebruikers` SET status = '1' WHERE email = '".$mail."'");
}
// Is het mailadres correct?
function validate_mail($mail)
{
if(!filter_var($mail, FILTER_VALIDATE_EMAIL))
{
$mail = 'false';
return $mail;
}
}
function createRandomPassword() {
$chars = "abcdefghijkmnopqrstuvwxyz023456789ABCDEFGHIJKMNOPQRSTUVXYZ023456789";
srand((double)microtime()*1000000);
$i = 0;
$pass = '' ;
while ($i <= 6) {
$num = rand() % 66;
$tmp = substr($chars, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}
function login_check($user,$pass)
{
$user = strip_tags($user);
$pass = md5(strip_tags($pass));
$query = mysql_query("SELECT id, status FROM `gebruikers` WHERE gebruikersnaam = '$user' AND wachtwoord = '$pass'");
if (!$query)
{
return ERROR;
}
else
{
if($row = mysql_fetch_assoc($query))
{
if ($row['status'] == 0)
{
return STATUS;
}
else
{
$_SESSION['id'] = $row['id'];
return LOGIN_TRUE;
}
}
else
{
return LOGIN_ERROR;
}
}
}
function info_user($info)
{
// Gegevens opvragen van de persoon met de id = $id
$query = mysql_query("SELECT ".$info." FROM `gebruikers` WHERE `id` = '".$_SESSION['id']."'");
$info_user = mysql_fetch_assoc($query);
// Return info_gebruiker
return $info_user[$info];
}
function coins($coins)
{
$coins = number_format($coins, 0, ',', '.').',-';
return $coins;
}
function number_rides()
{
$query = mysql_query("SELECT id FROM `at_gebruikers` WHERE `id` = '".$_SESSION['id']."'");
$number_rides = mysql_num_rows($query);
return $number_rides;
}
?>
Ik snap er eerlijk gezegd niet veel meer van..
De error geeft bij main.functions.php regel 119 aan. En je hebt er maar 115. Dus er zullen waarschijnlijk lege regels staan vóór of ná de php-tags.
Hoeveel regels en wat precies staat er in die language bestanden?
- SanThe - op 30/12/2010 15:37:41:
De error geeft bij main.functions.php regel 119 aan. En je hebt er maar 115. Dus er zullen waarschijnlijk lege regels staan vóór of ná de php-tags.
Kopieer je code is en plak het is in een nieuw leeg bestand. Misschien heb je een BOM fout in je code zitten (byte order mark) ook wel lege ruimte die je niet ziet.
Gewijzigd op 30/12/2010 15:48:22 door Mike Smit
index.php
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
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
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
session_start();
require_once('functions/main.functions.php');
check_language(); // Taal kijken
connect(); // Connectie met de database;
if (!isset($_COOKIE['language'])){ $language = 'nl';}else{ $language = $_COOKIE['language'];}
if (!isset($_GET['page'])) { $page = md5("home"); }else { $page = $_GET['page']; }
?>
<!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=utf-8" />
<title>TITEL</title>
<script type="text/javascript" src="js/mouseover_<?php echo $language; ?>.js"></script>
<script src="js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/form.js"></script>
<link rel="stylesheet" type="text/css" href="css/form.css" />
<link rel="stylesheet" type="text/css" href="css/main_style.css" />
</head>
<body>
<div id="container"><!-- Container Open -->
<div id="language">
<a href="?page=<?php print md5("language"); ?>&language=<?php print md5("nl");?>&page2=<?php echo $_GET['page']; ?>" onmouseover="roll('Nederlands', 'languages/flags/nl_over.gif')" onmouseout="roll('Nederlands', 'languages/flags/nl.gif')"><img src="languages/flags/nl.gif" alt="Nederlands" title="Nederlands" name="Nederlands"/></a>
<a href="?page=<?php print md5("language"); ?>&language=<?php print md5("en") ?>&page2=<?php echo $_GET['page']; ?>" onmouseover="roll('English', 'languages/flags/en_over.gif')" onmouseout="roll('English', 'languages/flags/en.gif')"><img src="languages/flags/en.gif" alt="English" title="English" name="English"/></a>
<a href="?page=<?php print md5("language"); ?>&language=<?php print md5("de") ?>&page2=<?php echo $_GET['page']; ?>" onmouseover="roll('Deutch', 'languages/flags/de_over.gif')" onmouseout="roll('Deutch', 'languages/flags/de.gif')"><img src="languages/flags/de.gif" alt="Deutch" title="Deutch" name="Deutch"/></a>
</div>
<div id="banners">
<img src="css/images/banners/<?php echo date('w');?>.jpg" alt="FairMania"/>
</div>
<div id="menu"><!-- Menu Open -->
<ul>
<li><a href="?page=<?php print md5('home'); ?>" onmouseover="roll('Start', 'css/images/menu/<?php echo $language; ?>/start_over.png')" onmouseout="roll('Start', 'css/images/menu/<?php echo $language; ?>/start.png')"><img src="css/images/menu/<?php echo $language; ?>/start.png" alt="Start" name="Start"/></a>
</li>
<li><a href="#" onmouseover="roll('Profiel','css/images/menu/<?php echo $language; ?>/profiel_over.png')" onmouseout="roll('Profiel', 'css/images/menu/<?php echo $language; ?>/profiel.png')"><img src="css/images/menu/<?php echo $language; ?>/profiel.png" alt="Profiel" name="Profiel"/></a></li>
<li><a href="#" onmouseover="roll('Thuis','css/images/menu/<?php echo $language; ?>/thuis_over.png')" onmouseout="roll('Thuis', 'css/images/menu/<?php echo $language; ?>/thuis.png')"><img src="css/images/menu/<?php echo $language; ?>/thuis.png" alt="Thuis" name="Thuis"/></a></li>
<li><a href="#" onmouseover="roll('Kopen','css/images/menu/<?php echo $language; ?>/kopen_over.png')" onmouseout="roll('Kopen', 'css/images/menu/<?php echo $language; ?>/kopen.png')"><img src="css/images/menu/<?php echo $language; ?>/kopen.png" alt="Kopen" name="Kopen"/></a></li>
<li><a href="#" onmouseover="roll('Pachten','css/images/menu/<?php echo $language; ?>/pachten_over.png')" onmouseout="roll('Pachten', 'css/images/menu/<?php echo $language; ?>/pachten.png')"><img src="css/images/menu/<?php echo $language; ?>/pachten.png" alt="Pachten" name="Pachten"/></a></li>
<li><a href="#" onmouseover="roll('Kermissen','css/images/menu/<?php echo $language; ?>/kermissen_over.png')" onmouseout="roll('Kermissen', 'css/images/menu/<?php echo $language; ?>/kermissen.png')"><img src="css/images/menu/<?php echo $language; ?>/kermissen.png" alt="Kermissen" name="Kermissen" /></a></li>
<li><a href="http://www.mbdesigner.nl/Fairmania/Forum" target="_new" onmouseover="roll('Forum','css/images/menu/<?php echo $language; ?>/forum_over.png')" onmouseout="roll('Forum', 'css/images/menu/<?php echo $language; ?>/forum.png')"><img src="css/images/menu/<?php echo $language; ?>/forum.png" alt="Forum" name="Forum" /></a></li>
</ul>
</div><!-- Menu Sluit -->
<div id="content">
<!-- Content Open -->
<?php
$frame_check = true; // Ja, de pagina zit in de 'hoofdpagina'
require_once('pages/content.php');
?>
</div>
<!-- Content Sluit -->
<div id="first_box">
<?php require_once('pages/box_login.php'); ?>
</div>
<div id="normal_box">
</div>
<div id="normal_box">
</div>
<div id="last_box">
</div>
</div><!-- Container Sluit -->
<div id="footer"><!-- Footer Open -->
</div><!-- Footer Sluit -->
</body>
</html>
ini_set('display_errors', 'On');
error_reporting(E_ALL);
session_start();
require_once('functions/main.functions.php');
check_language(); // Taal kijken
connect(); // Connectie met de database;
if (!isset($_COOKIE['language'])){ $language = 'nl';}else{ $language = $_COOKIE['language'];}
if (!isset($_GET['page'])) { $page = md5("home"); }else { $page = $_GET['page']; }
?>
<!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=utf-8" />
<title>TITEL</title>
<script type="text/javascript" src="js/mouseover_<?php echo $language; ?>.js"></script>
<script src="js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/form.js"></script>
<link rel="stylesheet" type="text/css" href="css/form.css" />
<link rel="stylesheet" type="text/css" href="css/main_style.css" />
</head>
<body>
<div id="container"><!-- Container Open -->
<div id="language">
<a href="?page=<?php print md5("language"); ?>&language=<?php print md5("nl");?>&page2=<?php echo $_GET['page']; ?>" onmouseover="roll('Nederlands', 'languages/flags/nl_over.gif')" onmouseout="roll('Nederlands', 'languages/flags/nl.gif')"><img src="languages/flags/nl.gif" alt="Nederlands" title="Nederlands" name="Nederlands"/></a>
<a href="?page=<?php print md5("language"); ?>&language=<?php print md5("en") ?>&page2=<?php echo $_GET['page']; ?>" onmouseover="roll('English', 'languages/flags/en_over.gif')" onmouseout="roll('English', 'languages/flags/en.gif')"><img src="languages/flags/en.gif" alt="English" title="English" name="English"/></a>
<a href="?page=<?php print md5("language"); ?>&language=<?php print md5("de") ?>&page2=<?php echo $_GET['page']; ?>" onmouseover="roll('Deutch', 'languages/flags/de_over.gif')" onmouseout="roll('Deutch', 'languages/flags/de.gif')"><img src="languages/flags/de.gif" alt="Deutch" title="Deutch" name="Deutch"/></a>
</div>
<div id="banners">
<img src="css/images/banners/<?php echo date('w');?>.jpg" alt="FairMania"/>
</div>
<div id="menu"><!-- Menu Open -->
<ul>
<li><a href="?page=<?php print md5('home'); ?>" onmouseover="roll('Start', 'css/images/menu/<?php echo $language; ?>/start_over.png')" onmouseout="roll('Start', 'css/images/menu/<?php echo $language; ?>/start.png')"><img src="css/images/menu/<?php echo $language; ?>/start.png" alt="Start" name="Start"/></a>
</li>
<li><a href="#" onmouseover="roll('Profiel','css/images/menu/<?php echo $language; ?>/profiel_over.png')" onmouseout="roll('Profiel', 'css/images/menu/<?php echo $language; ?>/profiel.png')"><img src="css/images/menu/<?php echo $language; ?>/profiel.png" alt="Profiel" name="Profiel"/></a></li>
<li><a href="#" onmouseover="roll('Thuis','css/images/menu/<?php echo $language; ?>/thuis_over.png')" onmouseout="roll('Thuis', 'css/images/menu/<?php echo $language; ?>/thuis.png')"><img src="css/images/menu/<?php echo $language; ?>/thuis.png" alt="Thuis" name="Thuis"/></a></li>
<li><a href="#" onmouseover="roll('Kopen','css/images/menu/<?php echo $language; ?>/kopen_over.png')" onmouseout="roll('Kopen', 'css/images/menu/<?php echo $language; ?>/kopen.png')"><img src="css/images/menu/<?php echo $language; ?>/kopen.png" alt="Kopen" name="Kopen"/></a></li>
<li><a href="#" onmouseover="roll('Pachten','css/images/menu/<?php echo $language; ?>/pachten_over.png')" onmouseout="roll('Pachten', 'css/images/menu/<?php echo $language; ?>/pachten.png')"><img src="css/images/menu/<?php echo $language; ?>/pachten.png" alt="Pachten" name="Pachten"/></a></li>
<li><a href="#" onmouseover="roll('Kermissen','css/images/menu/<?php echo $language; ?>/kermissen_over.png')" onmouseout="roll('Kermissen', 'css/images/menu/<?php echo $language; ?>/kermissen.png')"><img src="css/images/menu/<?php echo $language; ?>/kermissen.png" alt="Kermissen" name="Kermissen" /></a></li>
<li><a href="http://www.mbdesigner.nl/Fairmania/Forum" target="_new" onmouseover="roll('Forum','css/images/menu/<?php echo $language; ?>/forum_over.png')" onmouseout="roll('Forum', 'css/images/menu/<?php echo $language; ?>/forum.png')"><img src="css/images/menu/<?php echo $language; ?>/forum.png" alt="Forum" name="Forum" /></a></li>
</ul>
</div><!-- Menu Sluit -->
<div id="content">
<!-- Content Open -->
<?php
$frame_check = true; // Ja, de pagina zit in de 'hoofdpagina'
require_once('pages/content.php');
?>
</div>
<!-- Content Sluit -->
<div id="first_box">
<?php require_once('pages/box_login.php'); ?>
</div>
<div id="normal_box">
</div>
<div id="normal_box">
</div>
<div id="last_box">
</div>
</div><!-- Container Sluit -->
<div id="footer"><!-- Footer Open -->
</div><!-- Footer Sluit -->
</body>
</html>
En de rest staat terug in dit topic..
Maar wat heb je nu al geprobeerd naar aanleiding van de antwoorden?
- SanThe - op 30/12/2010 15:47:51:
Maar wat heb je nu al geprobeerd naar aanleiding van de antwoorden?
Ik heb een nieuwe pagina aangemaakt met daarin hetzelfde als index.php alleen dan zonder alle overbodige dingen zoals javascript.
pagina2.php
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
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
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
session_start();
require_once('functions/main.functions.php');
check_language(); // Taal kijken
if (!isset($_COOKIE['language'])){ $language = 'nl';}else{ $language = $_COOKIE['language'];}
if (!isset($_GET['page'])) { $page = md5("home"); }else { $page = $_GET['page']; }
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<a href="?page=<?php print md5("language"); ?>&language=<?php print md5("nl");?>&page2=<?php echo $_GET['page']; ?>" /><img src="languages/flags/nl.gif" alt="Nederlands" title="Nederlands" name="Nederlands"/></a>
<div id="content">
<!-- Content Open -->
<?php
$frame_check = true; // Ja, de pagina zit in de 'hoofdpagina'
require_once('pages/content.php');
?>
</div>
</body>
</html>
ini_set('display_errors', 'On');
error_reporting(E_ALL);
session_start();
require_once('functions/main.functions.php');
check_language(); // Taal kijken
if (!isset($_COOKIE['language'])){ $language = 'nl';}else{ $language = $_COOKIE['language'];}
if (!isset($_GET['page'])) { $page = md5("home"); }else { $page = $_GET['page']; }
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<a href="?page=<?php print md5("language"); ?>&language=<?php print md5("nl");?>&page2=<?php echo $_GET['page']; ?>" /><img src="languages/flags/nl.gif" alt="Nederlands" title="Nederlands" name="Nederlands"/></a>
<div id="content">
<!-- Content Open -->
<?php
$frame_check = true; // Ja, de pagina zit in de 'hoofdpagina'
require_once('pages/content.php');
?>
</div>
</body>
</html>
En ik heb main.functions.php ingekort:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
function check_language()
{
// Bestaat de cookie met de language waarde (nl,en of de)
if (!isset($_COOKIE['language']))
{
require_once('languages/nl.php');
}
else
{
require_once('languages/'.$_COOKIE['language'].'.php');
}
}
?>
function check_language()
{
// Bestaat de cookie met de language waarde (nl,en of de)
if (!isset($_COOKIE['language']))
{
require_once('languages/nl.php');
}
else
{
require_once('languages/'.$_COOKIE['language'].'.php');
}
}
?>
En dan werkt het nog niet..
http://mbdesigner.nl/Fair/pagina2.php
Gewijzigd op 30/12/2010 16:06:42 door P-ter AA
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<a href="pagina2.php?page=8512ae7d57b1396273f76fe6ed341a23&language=1a13105b7e4eb5fb2e7c9515ac06aa48&page2=8512ae7d57b1396273f76fe6ed341a23" /><img src="languages/flags/nl.gif" alt="Nederlands" title="Nederlands" name="Nederlands"/></a>
<div id="content">
<!-- Content Open -->
Notice: Undefined index: language in /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/pages/dynamic/language.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/functions/main.functions.php:119) in /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/pages/dynamic/language.php on line 11
Notice: Undefined index: page2 in /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/pages/dynamic/language.php on line 18
<meta http-equiv="refresh" content="0;URL=?page=" /> </div>
</body>
</html>
Karl Karl op 30/12/2010 16:18:12:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<a href="pagina2.php?page=8512ae7d57b1396273f76fe6ed341a23&language=1a13105b7e4eb5fb2e7c9515ac06aa48&page2=8512ae7d57b1396273f76fe6ed341a23" /><img src="languages/flags/nl.gif" alt="Nederlands" title="Nederlands" name="Nederlands"/></a>
<div id="content">
<!-- Content Open -->
Notice: Undefined index: language in /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/pages/dynamic/language.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/functions/main.functions.php:119) in /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/pages/dynamic/language.php on line 11
Notice: Undefined index: page2 in /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/pages/dynamic/language.php on line 18
<meta http-equiv="refresh" content="0;URL=?page=" /> </div>
</body>
</html>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<a href="pagina2.php?page=8512ae7d57b1396273f76fe6ed341a23&language=1a13105b7e4eb5fb2e7c9515ac06aa48&page2=8512ae7d57b1396273f76fe6ed341a23" /><img src="languages/flags/nl.gif" alt="Nederlands" title="Nederlands" name="Nederlands"/></a>
<div id="content">
<!-- Content Open -->
Notice: Undefined index: language in /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/pages/dynamic/language.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/functions/main.functions.php:119) in /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/pages/dynamic/language.php on line 11
Notice: Undefined index: page2 in /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/pages/dynamic/language.php on line 18
<meta http-equiv="refresh" content="0;URL=?page=" /> </div>
</body>
</html>
Verdomme.. Hoe kan dat! Alles staat toch in de URL? (page, language, page2)
En die meta is ook erg hinderlijk.
Maurice vB op 30/12/2010 16:25:04:
Hoe kan dat! Alles staat toch in de URL? (page, language, page2)
Daar is toch niet op geklikt,
Karl Karl op 30/12/2010 16:26:44:
Wat staat er in content.php?
En die meta is ook erg hinderlijk.
En die meta is ook erg hinderlijk.
In content.php staat:
Die 'onzin' haal ik nog weg (A)
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
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
<?php
if (!isset($frame_check)){ header('location: ../index.php'); }
if (isset($_GET['page'])) // Is en een pagina opgegeven?
{
$page = strip_tags($_GET['page']);
}
else
{
$page = 'start';
}
switch ($page) // Wat is opgegeven?
{
default:
include('pages/static/home.php');
break;
case ''.md5('home').'':
include('pages/static/home.php');
break;
case ''.md5('login').'':
include('pages/dynamic/login.php');
break;
case ''.md5('logout').'':
include('pages/dynamic/logout.php');
break;
case ''.md5('register').'':
include('pages/dynamic/register.php');
break;
case ''.md5('register_user').'':
include('pages/dynamic/register_user.php');
break;
case ''.md5('activate').'':
include('pages/dynamic/activate.php');
break;
case ''.md5('language').'':
include('pages/dynamic/language.php');
break;
case ''.md5('forgotpass').'':
include('pages/dynamic/forgotpass.php');
break;
}
?>
if (!isset($frame_check)){ header('location: ../index.php'); }
if (isset($_GET['page'])) // Is en een pagina opgegeven?
{
$page = strip_tags($_GET['page']);
}
else
{
$page = 'start';
}
switch ($page) // Wat is opgegeven?
{
default:
include('pages/static/home.php');
break;
case ''.md5('home').'':
include('pages/static/home.php');
break;
case ''.md5('login').'':
include('pages/dynamic/login.php');
break;
case ''.md5('logout').'':
include('pages/dynamic/logout.php');
break;
case ''.md5('register').'':
include('pages/dynamic/register.php');
break;
case ''.md5('register_user').'':
include('pages/dynamic/register_user.php');
break;
case ''.md5('activate').'':
include('pages/dynamic/activate.php');
break;
case ''.md5('language').'':
include('pages/dynamic/language.php');
break;
case ''.md5('forgotpass').'':
include('pages/dynamic/forgotpass.php');
break;
}
?>
Gewijzigd op 30/12/2010 16:30:51 door P-ter AA
Wat doen al die lege strings daar in de cases?
- SanThe - op 30/12/2010 16:32:22:
Wat doen al die lege strings daar in de cases?
Dat haal ik nog weg, daar had Karl Karl me al opgewezen.
Edit: Heb de metatag weggehaald en nou geeft hij:
Warning: Cannot modify header information - headers already sent by (output started at /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/2/functions/main.functions.php:119) in /customers/mbdesigner.nl/mbdesigner.nl/httpd.www/Fair/2/pages/dynamic/language.php on line 32
Met de code in language.php
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
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
<?php
if (!isset($frame_check)){ header('location: ../../index.php'); }
if (empty ($_GET['language']))
{
echo '<b>'.LANGUAGE.'</b>';
echo "<br/><br/>";
echo NOLANGUAGE;
}
else
{
$language = $_GET['language'];
switch ($language)
{
// Standaard
default:
if (!isset($_COOKIE['language']))
{
setcookie("language", 'nl', mktime(18, 30, 0, 5, 12, 2020));
}
else
{
setcookie("language", "", time()-3600);
setcookie("language", 'nl', mktime(18, 30, 0, 5, 12, 2020));
}
break;
// Nederlands
case ''.md5('nl').'':
if (!isset($_COOKIE['language']))
{
setcookie("language", 'nl', mktime(18, 30, 0, 5, 12, 2020));
}
else
{
setcookie("language", "", time()-3600);
setcookie("language", 'nl', mktime(18, 30, 0, 5, 12, 2020));
}
break;
// Engels
case ''.md5('en').'':
if (!isset($_COOKIE['language']))
{
setcookie("language", 'en', mktime(18, 30, 0, 5, 12, 2020));
}
else
{
setcookie("language", "", time()-3600);
setcookie("language", 'en', mktime(18, 30, 0, 5, 12, 2020));
}
break;
// Duits
case ''.md5('de').'':
if (!isset($_COOKIE['language']))
{
setcookie("language", 'de', mktime(18, 30, 0, 5, 12, 2020));
}
else
{
setcookie("language", "", time()-3600);
setcookie("language", 'de', mktime(18, 30, 0, 5, 12, 2020));
}
break;
}
}
?>
if (!isset($frame_check)){ header('location: ../../index.php'); }
if (empty ($_GET['language']))
{
echo '<b>'.LANGUAGE.'</b>';
echo "<br/><br/>";
echo NOLANGUAGE;
}
else
{
$language = $_GET['language'];
switch ($language)
{
// Standaard
default:
if (!isset($_COOKIE['language']))
{
setcookie("language", 'nl', mktime(18, 30, 0, 5, 12, 2020));
}
else
{
setcookie("language", "", time()-3600);
setcookie("language", 'nl', mktime(18, 30, 0, 5, 12, 2020));
}
break;
// Nederlands
case ''.md5('nl').'':
if (!isset($_COOKIE['language']))
{
setcookie("language", 'nl', mktime(18, 30, 0, 5, 12, 2020));
}
else
{
setcookie("language", "", time()-3600);
setcookie("language", 'nl', mktime(18, 30, 0, 5, 12, 2020));
}
break;
// Engels
case ''.md5('en').'':
if (!isset($_COOKIE['language']))
{
setcookie("language", 'en', mktime(18, 30, 0, 5, 12, 2020));
}
else
{
setcookie("language", "", time()-3600);
setcookie("language", 'en', mktime(18, 30, 0, 5, 12, 2020));
}
break;
// Duits
case ''.md5('de').'':
if (!isset($_COOKIE['language']))
{
setcookie("language", 'de', mktime(18, 30, 0, 5, 12, 2020));
}
else
{
setcookie("language", "", time()-3600);
setcookie("language", 'de', mktime(18, 30, 0, 5, 12, 2020));
}
break;
}
}
?>
En op lijn 32 staat:
Gewijzigd op 30/12/2010 17:08:21 door P-ter AA
Geen html echo'en vooraleer je setcookie doet.
Kris Peeters op 30/12/2010 17:18:19:
Ook daar weer het zelfde verhaal.
Geen html echo'en vooraleer je setcookie doet.
Geen html echo'en vooraleer je setcookie doet.
Sorry maar ik snap er niks van. Ik echo de meta toch pas NA de set cookie?
Komt me bekend voor, die error