stoomboot
Legacy Member
Zeer bizar gedoe hier.
Resultaat bij goede login:
Warning: session_register() [function.session-register]: Cannot send session cookie - headers already sent by (output started at X:\login.php:1) in X:\login.php on line 25
Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at X:\login.php:1) in X:\login.php on line 25
Warning: Cannot modify header information - headers already sent by (output started at X:\login.php:1) in X:\login.php on line 27
Resultaat bij foute login:
FOUTE LOGIN - OPNIEUW PROBEREN
Nu is de hamvraag: Welke headers zijn er dan reeds verstuurd?
PHP:
<?php
$host="localhost";
$username="username";
$password="password";
$db_name="database";
$tbl_name="tabel";
mysql_connect("$host", "$username", "$password")or die("CONNECTIE FOUT");
mysql_select_db("$db_name")or die("DATABASE FOUT");
$myusername = MD5($_POST[loginnaam]);
$mypassword = MD5($_POST[loginwachtwoord]);
$sql="SELECT * FROM $tbl_name WHERE naammd5='$myusername' and wachtwoordmd5='$mypassword'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1){
session_register("myusername");
session_register("mypassword");
header("location:https://www.beyondgaming.be/forums");
} else {
echo"FOUTE LOGIN - OPNIEUW PROBEREN";
}
?>
Resultaat bij goede login:
Warning: session_register() [function.session-register]: Cannot send session cookie - headers already sent by (output started at X:\login.php:1) in X:\login.php on line 25
Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at X:\login.php:1) in X:\login.php on line 25
Warning: Cannot modify header information - headers already sent by (output started at X:\login.php:1) in X:\login.php on line 27
Resultaat bij foute login:
FOUTE LOGIN - OPNIEUW PROBEREN
Nu is de hamvraag: Welke headers zijn er dan reeds verstuurd?


.