Hallo,
Weet iemand misschien waarom ik de volgende error's krijg:
Warning: Cannot send session cookie - headers already sent by (output started at /home/sites/site102/web/school/login.php:6) in /home/sites/site102/web/school/login.php on line 33
Warning: Cannot send session cache limiter - headers already sent (output started at /home/sites/site102/web/school/login.php:6) in /home/sites/site102/web/school/login.php on line 33
Weet iemand misschien waarom ik de volgende error's krijg:
Warning: Cannot send session cookie - headers already sent by (output started at /home/sites/site102/web/school/login.php:6) in /home/sites/site102/web/school/login.php on line 33
Warning: Cannot send session cache limiter - headers already sent (output started at /home/sites/site102/web/school/login.php:6) in /home/sites/site102/web/school/login.php on line 33
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
| <? require("../includes/config.php"); ?> <html> <head> <title><?=$Sitenaam?> - Login</title> </head> <?=$body?> <center><h3>Login</h3> <form action="login.php" method="post"> Gebruikersnaam:<br> <input type="hidden" name="Submit" value="1"> <input type="Text" name="gebruikersnaam"><p> Wachtwoord:<br> <input type="Password" name="wachtwoord"><p> <input type="Submit" value="Login!"> </form> </center> <?php require("../includes/mysql.php"); If ($Submit) { $HTTP_POST_VARS['gebruikersnaam'] = addslashes($HTTP_POST_VARS['gebruikersnaam']); $HTTP_POST_VARS['$wachtwoord'] = addslashes($HTTP_POST_VARS['wachtwoord']); $Query = mysql_query("SELECT * FROM gebruikers WHERE gebruikersnaam = '$HTTP_POST_VARS[gebruikersnaam]' AND password = '$HTTP_POST_VARS[wachtwoord]'"); $Results = mysql_num_rows($Query); if ($Results == '1') { $TEST->Login = 1; $TEST->Username = "$HTTP_POST_VARS[gebruikersnaam]"; $TEST->Password = "$HTTP_POST_VARS[wachtwoord]"; session_register("TEST"); echo " Je bent ingelogd als $TEST->Username .n"; } else { print "Je gebruikersnaam of wachtwoord klopt niet. Probeer het opnieuw. n"; } } ?> |