Session

Gestart doorShahiem5 reacties27 weergaven

6 berichten · pagina 1 van 1

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hi,

Ik krijg de volgende foutmelding bij mijn statistiekenscript.

Kan iemand helpen.

Code van header.php:

[COLOR= #0000BB]<?php[/COLOR]
            [URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]config.php[/COLOR][COLOR= #007700];[/COLOR]
            
            [COLOR= #0000BB]$leden[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT 1 FROM leden"[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$fetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$leden[/COLOR][COLOR= #007700]);[/COLOR]
            
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Leden: <strong>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$fetch[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]</strong>[/COLOR][COLOR= #007700];[/COLOR]
            ?>


Code van config.php

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/ob_start"]ob_start[/URL][COLOR= #007700]();[/COLOR]

[COLOR= #FF8000]//Connectie maken met Database[/COLOR]
[URL="http://www.php.net/mysql_connect"]mysql_connect[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"localhost"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]

[COLOR= #FF8000]// Instellingen[/COLOR]
?>
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Geen foutmelding?
0
Berichten
3.225
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bij fetch gedeelde moet volgensmij nog iets, en je moet db connectie natuurlijk nog instelle, maar heb je denk ik al.
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
je hebt al contents gestuurt voordat je session_start(); doet:
eerst heb je je header, en dan include je pas config.php waarin session_start(); staat die helemaal bovenaan moet staan
0
Berichten
3.225
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Staat ie ook?
Kijk eens goed?
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dankjewel Sjoerd. ik heb session en ob_start in header.php gezet. En nu doet hij het.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren