Error session_start()

Gestart doorPropje9 reacties54 weergaven

10 berichten · pagina 1 van 1

Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb een fout met session_start()

namenlijk deze.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/propje/domains/propje.s2.one2xs.com/public_html/lijst2.php:9) in /home/propje/domains/propje.s2.one2xs.com/public_html/includes/header.php  on line 2


de php code op regel 2 is:

session_start();


Hoe kan ik dit oplossen want zo kan ik niet meer inloggen,registreeren etc.
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Voor je php code heb je al html code staan. Dit kan bijvoorbeeld een spatie zijn
0
Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@luukvdo

ik heb je een pm gestuurt met die php code.
0
Berichten
5.957
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
1 woord google.
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als je nou gewoon de eerste 5 regels van je script hier plaatst... dan kunnen we er wat mee....
0
Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
header code

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

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]login[/COLOR][COLOR= #007700]])){[/COLOR]
    [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM Leden WHERE ID = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]login[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]) !=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<i>Er is iets misgegaan, u word uitgelogd!</i>"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$inloggen[/COLOR][COLOR= #007700]->[/COLOR]uitloggen[COLOR= #007700]();
    }[/COLOR]


login code

<!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>N3WKIDS.info - Je ken de groeten uit Brabant krijgen KUT!</title>

</head>
<link rel="stylesheet" type="text/css" href="style.css">
<body style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;">
<div id="head"><a href="#">Registreer je gratis!</a></div>
<div id="menu">  
  
      <TD><INPUT TYPE="TEXT" NAME="ad_name" SIZE="30px" value="Gebruikersnaam"/></TD>
    </TR> <TR> <TD><INPUT TYPE="TEXT" NAME="ad_name" SIZE="30px" value="*******"/> </TD></TR>
    <div id="zoek"></TR> <TR> <TD><INPUT TYPE="TEXT" NAME="ad_name" SIZE="30px" value=Zoek> </TD></TR></div><a href="registreren.php"><div id="knop"></div></a>  
    <a href="inloggen.php"><div id="knop1"></div></a> </div>
<div id="balk"><select name="seizoen" onblur="calcage(this.form);">
<option value="1">Seizoen 1</option><option value="2">Seizoen 2</option><option value="3">Seizoen 3</option><option value="4">Seizoen 4</option><option value="5">Seizoen 5</option><option value="6">Seizoen 6</option></select> Je bent hier: Newkids blalbala  </div> 
<div id="MeNu">
<div id="Menutop">&nbsp;Menu</div>
<div id="Menumid"><b>N3wKids.info leden</b><br>
>> <a href="#">Registreren</a><br>
>> <a href="#">Inloggen</a><br>
>> <a href="#">Wachtwoord vergeten</a><br>
<br>
<b>Videos</b><br>
>> <a href="#">Seizoen 1</a><br>
>> <a href="#">Seizoen 2</a><br>
>> <a href="#">Seizoen 3</a><br>
>> <a href="#">N3wKids promos</a><br>
>> <a href="#">Overzicht<br></a><br><br>
<b>Community</b><br>
>> <a href="#">Forum</a><br>
>> <a href="#">Chat</a><br>
>> <a href="#">N3wVids</a><br>
</ul> </div>
<div id="Menubottom"></div></div>
<div id="Content">
<div id="Contenttop">Welkom op N3wKids.info!</div>
<div id="Contentmid">
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]includes/header.php[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$check[/COLOR][COLOR= #007700]->[/COLOR]nlogin[COLOR= #007700]();[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$Layout[/COLOR][COLOR= #007700]->[/COLOR]top[COLOR= #007700]([/COLOR][COLOR= #0000BB]$title[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]inloggen[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]])){[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<i>U hebt niet alle velden ingevuld!</i>"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$inloggen[/COLOR][COLOR= #007700]->[/COLOR]login[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]);
    }
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    ?>
    <form action="inloggen.php" method="post">
    <table>
    <tr><td>Gebruikersnaam</td><td><input type="text" name="naam" /></td></tr>
    <tr><td>Wachtwoord</td><td><input type="password" name="pass" /></td></tr>
    <tr><td></td><td><input type="submit" name="inloggen" value="Inloggen" /></td></tr>
    </table>
    </form>
    [COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$Layout[/COLOR][COLOR= #007700]->[/COLOR]bottom[COLOR= #007700]();[/COLOR]
?>
</div>
<div id="Contentbottom"></div>

</div>
</body> 
</html>
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Session start moet als eerste op de pagina:

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR] ?>
<!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>N3WKIDS.info - Je ken de groeten uit Brabant krijgen KUT!</title>

</head>
<link rel="stylesheet" type="text/css" href="style.css">
<body style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;">
<div id="head"><a href="#">Registreer je gratis!</a></div>
<div id="menu">  
  
      <TD><INPUT TYPE="TEXT" NAME="ad_name" SIZE="30px" value="Gebruikersnaam"/></TD>
    </TR> <TR> <TD><INPUT TYPE="TEXT" NAME="ad_name" SIZE="30px" value="*******"/> </TD></TR>
    <div id="zoek"></TR> <TR> <TD><INPUT TYPE="TEXT" NAME="ad_name" SIZE="30px" value=Zoek> </TD></TR></div><a href="registreren.php"><div id="knop"></div></a>  
    <a href="inloggen.php"><div id="knop1"></div></a> </div>
<div id="balk"><select name="seizoen" onblur="calcage(this.form);">
<option value="1">Seizoen 1</option><option value="2">Seizoen 2</option><option value="3">Seizoen 3</option><option value="4">Seizoen 4</option><option value="5">Seizoen 5</option><option value="6">Seizoen 6</option></select> Je bent hier: Newkids blalbala  </div>
<div id="MeNu">
<div id="Menutop">&nbsp;Menu</div>
<div id="Menumid"><b>N3wKids.info leden</b><br>
>> <a href="#">Registreren</a><br>
>> <a href="#">Inloggen</a><br>
>> <a href="#">Wachtwoord vergeten</a><br>
<br>
<b>Videos</b><br>
>> <a href="#">Seizoen 1</a><br>
>> <a href="#">Seizoen 2</a><br>
>> <a href="#">Seizoen 3</a><br>
>> <a href="#">N3wKids promos</a><br>
>> <a href="#">Overzicht<br></a><br><br>
<b>Community</b><br>
>> <a href="#">Forum</a><br>
>> <a href="#">Chat</a><br>
>> <a href="#">N3wVids</a><br>
</ul> </div>
<div id="Menubottom"></div></div>
<div id="Content">
<div id="Contenttop">Welkom op N3wKids.info!</div>
<div id="Contentmid">
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]includes/header.php[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$check[/COLOR][COLOR= #007700]->[/COLOR]nlogin[COLOR= #007700]();[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$Layout[/COLOR][COLOR= #007700]->[/COLOR]top[COLOR= #007700]([/COLOR][COLOR= #0000BB]$title[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]inloggen[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]])){[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<i>U hebt niet alle velden ingevuld!</i>"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$inloggen[/COLOR][COLOR= #007700]->[/COLOR]login[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]);
    }
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    ?>
    <form action="inloggen.php" method="post">
    <table>
    <tr><td>Gebruikersnaam</td><td><input type="text" name="naam" /></td></tr>
    <tr><td>Wachtwoord</td><td><input type="password" name="pass" /></td></tr>
    <tr><td></td><td><input type="submit" name="inloggen" value="Inloggen" /></td></tr>
    </table>
    </form>
    [COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$Layout[/COLOR][COLOR= #007700]->[/COLOR]bottom[COLOR= #007700]();[/COLOR]
?>
</div>
<div id="Contentbottom"></div>

</div>
</body>
</html>
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]includes/header.php[/COLOR][COLOR= #007700]);[/COLOR]
?><!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>N3WKIDS.info - Je ken de groeten uit Brabant krijgen KUT!</title>

</head>
<link rel="stylesheet" type="text/css" href="style.css">
<body style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;">
<div id="head"><a href="#">Registreer je gratis!</a></div>
<div id="menu">  
  
      <TD><INPUT TYPE="TEXT" NAME="ad_name" SIZE="30px" value="Gebruikersnaam"/></TD>
    </TR> <TR> <TD><INPUT TYPE="TEXT" NAME="ad_name" SIZE="30px" value="*******"/> </TD></TR>
    <div id="zoek"></TR> <TR> <TD><INPUT TYPE="TEXT" NAME="ad_name" SIZE="30px" value=Zoek> </TD></TR></div><a href="registreren.php"><div id="knop"></div></a>  
    <a href="inloggen.php"><div id="knop1"></div></a> </div>
<div id="balk"><select name="seizoen" onblur="calcage(this.form);">
<option value="1">Seizoen 1</option><option value="2">Seizoen 2</option><option value="3">Seizoen 3</option><option value="4">Seizoen 4</option><option value="5">Seizoen 5</option><option value="6">Seizoen 6</option></select> Je bent hier: Newkids blalbala  </div> 
<div id="MeNu">
<div id="Menutop">&nbsp;Menu</div>
<div id="Menumid"><b>N3wKids.info leden</b><br>
>> <a href="#">Registreren</a><br>
>> <a href="#">Inloggen</a><br>
>> <a href="#">Wachtwoord vergeten</a><br>
<br>
<b>Videos</b><br>
>> <a href="#">Seizoen 1</a><br>
>> <a href="#">Seizoen 2</a><br>
>> <a href="#">Seizoen 3</a><br>
>> <a href="#">N3wKids promos</a><br>
>> <a href="#">Overzicht<br></a><br><br>
<b>Community</b><br>
>> <a href="#">Forum</a><br>
>> <a href="#">Chat</a><br>
>> <a href="#">N3wVids</a><br>
</ul> </div>
<div id="Menubottom"></div></div>
<div id="Content">
<div id="Contenttop">Welkom op N3wKids.info!</div>
<div id="Contentmid">
[COLOR= #0000BB]<?php

$check[/COLOR][COLOR= #007700]->[/COLOR]nlogin[COLOR= #007700]();[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$Layout[/COLOR][COLOR= #007700]->[/COLOR]top[COLOR= #007700]([/COLOR][COLOR= #0000BB]$title[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]inloggen[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]])){[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<i>U hebt niet alle velden ingevuld!</i>"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$inloggen[/COLOR][COLOR= #007700]->[/COLOR]login[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]);
    }
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    ?>
    <form action="inloggen.php" method="post">
    <table>
    <tr><td>Gebruikersnaam</td><td><input type="text" name="naam" /></td></tr>
    <tr><td>Wachtwoord</td><td><input type="password" name="pass" /></td></tr>
    <tr><td></td><td><input type="submit" name="inloggen" value="Inloggen" /></td></tr>
    </table>
    </form>
    [COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$Layout[/COLOR][COLOR= #007700]->[/COLOR]bottom[COLOR= #007700]();[/COLOR]
?>
</div>
<div id="Contentbottom"></div>

</div>
</body> 
</html>


[/quote]
0
Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@eleky

krijg ik deze error

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/propje/domains/propje.s2.one2xs.com/public_html/inloggen.php:1) in /home/propje/domains/propje.s2.one2xs.com/public_html/inloggen.php on line 1

demo:
http://propje.s2.one2xs.com/inloggen.php
0
Berichten
57
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Propje schreef:
@eleky

krijg ik deze error

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/propje/domains/propje.s2.one2xs.com/public_html/inloggen.php:1) in /home/propje/domains/propje.s2.one2xs.com/public_html/inloggen.php on line 1

demo:
http://propje.s2.one2xs.com/inloggen.php
Lol new kids pompomIk had dit ook heel vaak nopompom .Lag aan omdat sommige dingen niet writeable zijn ofzo.Weet eigenlijk niet was lang geleden nooo.Maar ik kan wel registreren maar inloggen werkt weer niet redface
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