Heb op phpfreakz help al gelezen maar daarmee kon ik de fout ook niet vinden.
Ik heb dus een captcha in mijn gastenboek gebouwd en die werkt goed, maar krijg nog wel steeds deze fout:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/magistic/public_html/djzeec/index.php:52) in /home/magistic/public_html/djzeec/code.php on line 1
http://www.djzeec.nl/index.php?page=nieuws2&id=81
Alleen ik kan de fout nergens terug vinden, ik zit me er kapot op te staren misschien is dat de reden dat ik het niet zie.
index.php:
code.php
Ik heb dus een captcha in mijn gastenboek gebouwd en die werkt goed, maar krijg nog wel steeds deze fout:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/magistic/public_html/djzeec/index.php:52) in /home/magistic/public_html/djzeec/code.php on line 1
http://www.djzeec.nl/index.php?page=nieuws2&id=81
Alleen ik kan de fout nergens terug vinden, ik zit me er kapot op te staren misschien is dat de reden dat ik het niet zie.
index.php:
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
| <?php/* <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <link rel="shortcut icon" href="icon2.ico"/> <link rel="icon" href="icon2.ico"/> <link rel="stylesheet" type="text/css" href="stylesheet.css" /> <title>Welcome to the site of DjZeeC</title> </head> <body> <div id="siteholder"> <div> <?php include('flashheader.php'); ?> </div> <iframe class="iframe" scrolling="no" height="100%" src="index2.php" name="content"></iframe> </div> </body> </html> */?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Welcome @ the site of DjZeeC</title> </head> <link rel="shortcut icon" href="icon2.ico"/> <link rel="icon" href="icon2.ico"/> <link rel="stylesheet" type="text/css" href="stylesheet.css" /> <body> <div id="siteholder"> <div id="header"></div> <?php /*DE MENUBALK*/ include('menu.php'); ?> <div id="seperator"></div> <div id="collumLeft"> <h1>Latest news</h1> <div id="nieuws"> <?php include('laatstenieuws.php'); ?> </div> <h1>Newest Downloads</h1> <div class="downloads"> <?php include('meestgedownload.php'); ?> </div> </div> <div id="mainEntry"> <div class="entry"> <?php /*MIDDELSTE TABEL*/ switch (strtolower($_GET['page'])) { case "nieuws": $page="nieuws.php"; break; case "bio": $page="bio.php"; break; case "disco": $page="disco.php"; break; case "charts": $page="charts.php"; break; case "studio": $page="studio.php"; break; case "down": $page="down.php"; break; case "downloads2": $page="downloads2.php"; break; case "bookings": $page="bookings.php"; break; case "agenda": $page="agenda.php"; break; case "guestbook": $page="guestbook.php"; break; case "contact": $page="contact.php"; break; case "res": $page="zoek_resultaten.php"; break; case "poll_archief"; $page="poll_archief.php"; break; case "nieuws_archief"; $page="nieuws_archief.php"; break; case "nieuws2": $page="nieuws2.php"; break; case "laatstenieuws": $page="laatstenieuws.php"; break; default: //Geen pagina gevonden? standaard tekst $page="nieuws.php"; break; } include ($page); //include de variabele $page ?> </div> </div> <div id="collumRight"> <h1>Links</h1> <div> <p class="forTips"> <a href="http://www.mitflow.nl" target="_blank" title="Mitflow">.mitflow.nl.</a>TIP!<br /> <a href="http://www.clubcharts.nl" target="_blank" title="Clubcharts">.clubcharts.nl.</a><br /> <a href="http://forum.clubcharts.nl" target="_blank" title="Clubcharts Forum">.forum.clubcharts.nl.</a>TIP!<br /> <a href="http://www.fruityloops.com" target="_blank" title="FL Studio">.fruityloops.com.</a><br /> <a href="http://www.kvraudio.com" target="_blank" title="Kvr Audio">.kvraudio.com.</a><br /> <a href="http://www.pure-tv.nl" target="_blank" title="Pure-tv" >.pure-tv.nl.</a>TIP!<br /><br /> <a href="http://www.getfirefox.com" target="_blank" title="Firefox"><img border="0" src="gfx/get_firefox.png"/></a> </p> </div> <h1>Poll</h1> <div> <?php include('poll.php'); ?> </div> <h1>Search</h1> <div> <?php include('zoeken.php'); ?> <a href="asdf333/">.</a> </div> </div> </div> </body> </html> |
code.php
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
| <?php session_start(); ?> <div class="tab"> <h1 class="entry_title">Add message</h1> <div class="entry_content"> <p> <?php include("asdf333/dbconfig.php"); $sReactieQ = "SELECT id FROM nieuws WHERE id = $_GET[id]"; $res = mysql_query($sReactieQ); if(isset($_POST['submit'])) { if($_POST['controle'] == $_SESSION['code']) { if (!empty($_POST['submit']) && !empty($_POST['naam']) && !empty($_POST['msg'])) { $datum = date('d.m.Y'); $tijd = date('H:i'); $ip = $_SERVER['REMOTE_ADDR']; $sql = "INSERT INTO reacties (naam, msg, datum, tijd, ip, nieuws_id) VALUES ('".$_POST['naam']."', '".$_POST['msg']."', '".$datum."' , '".$tijd."', '".$ip."' , '".$_POST['nieuws_id']."')"; $res = mysql_query($sql); if ($res) { echo "Message added.<br />"; echo "Click <a href=\"index.php?page=nieuws2&id=".($_GET['id']). "\">here</a> to go back.<br /><br />"; } else echo mysql_errno() . ": " . mysql_error() . "\n"; } } else { echo "<b>The code is incorrect !</b> Go back and try again"; exit; } } echo "<form method=\"POST\" action=\"index.php?page=nieuws2&id=".($_GET['id']). "\" >"; ?> <table> <tr> <td></td><td><img src="plaatje.php"></td> </tr> <tr> <td>Code: </td><td><input class="input" type="text" name="controle" /></td> <?php echo "Name:<br />"; echo "<input type=\"text\" name=\"naam\" size=\"20\" maxlength=\"20\" value=\"" . ($_POST['naam']) . "\"><br />"; echo "Message:<br />"; echo "<textarea name=\"msg\" rows=\"5\" cols=\"35\">" . ($_POST['msg']) . "</textarea><br />"; echo "<input type=\"hidden\" name=\"nieuws_id\" size=\"5\" value=\" " .($_GET['id']). "\">"; ?> </tr> <tr> <td></td><td><input class="button" type="submit" name="submit" value="Add Message!" /></td> </tr> </table> </form> </p> </div> </div> |