Nieuw lid |
|
Ik heb een login script je maar als ik wil inloggen krijg ik de volgende foutmelding
Citaat: Warning: Cannot modify header information - headers already sent by (output started at /home/****/domains/******/public_html/****/index.php:14) in /home/****/domains/******/public_html/****/login.php on line 19
Warning: Cannot modify header information - headers already sent by (output started at /home/****/domains/******/public_html/****/index.php:14) in /home/****/domains/******/public_html/****/login.php on line 20
Warning: Cannot modify header information - headers already sent by (output started at /home/****/domains/******/public_html/****/index.php:14) in /home/****/domains/******/public_html/****/login.php on line 21
index.php regel 12 t/m 24
<table bgcolor="#FFFFFF" width="741" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="11" height="124">
<img src="images/index_01.gif" width="740" height="124" alt="" usemap="#header" border="0"></td>
<td>
<img src="images/spacer.gif" width="1" height="124" alt=""></td>
</tr>
<tr>
<td colspan="6" height="14">
<img src="images/index_02.gif" width="169" height="14" alt=""></td>
<td colspan="2" rowspan="2" height="33" width="20" valign="top">
<img src="images/index_03.gif" width="20" height="33" alt=""></td>
<td rowspan="2" style="background: url(images/index_04.gif) top repeat-x" height="33" class="titel">
<table bgcolor="#FFFFFF" width="741" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="11" height="124"> <img src="images/index_01.gif" width="740" height="124" alt="" usemap="#header" border="0"></td> <td> <img src="images/spacer.gif" width="1" height="124" alt=""></td> </tr> <tr> <td colspan="6" height="14"> <img src="images/index_02.gif" width="169" height="14" alt=""></td> <td colspan="2" rowspan="2" height="33" width="20" valign="top"> <img src="images/index_03.gif" width="20" height="33" alt=""></td> <td rowspan="2" style="background: url(images/index_04.gif) top repeat-x" height="33" class="titel">
en login.php regel 1 t/m 24
<?php
ob_start();
//Hoe lang de bezoeker mag ingelogged blijven:
$expiredate = time()+60*60*24*7; //ingesteld op 1 week
if ($logout == 1)
{ setcookie("username");
setcookie("passgecodeerd");
header("location:index.php");
exit;
}
if ($_POST["username"] && $_POST["password"])
{ // password coderen
$passgecodeerd = md5($_POST["password"]);
$username = $_POST["username"];
// variabelen in een cookie zetten
setcookie("username",$username,$expiredate);
setcookie("passgecodeerd",$passgecodeerd,$expiredate);
header("location:$_SERVER[REQUEST_URI]");
exit;
}
<?php //Hoe lang de bezoeker mag ingelogged blijven: $expiredate = time()+60*60*24*7; //ingesteld op 1 week if ($logout == 1) } if ($_POST["username"] && $_POST["password"]) { // password coderen $passgecodeerd = md5($_POST["password"]); $username = $_POST["username"]; // variabelen in een cookie zetten setcookie("passgecodeerd",$passgecodeerd,$expiredate); header("location:$_SERVER[REQUEST_URI]"); }
Wat is er aan de hand (ik heb nog nergens een header aangestuurd en de database klopt, het aanmelden werkt wel)
Al vast bedankt!...
|