PHP:
<?
if ($logged[gebruiker])
{
setcookie("id", 2132421,time()+(60*60*24*5), "/", "");
setcookie("pass", loggedout,time()+(60*60*24*5), "/", "");
echo ("You are now logged out! <br>");
header('Location: index.php');
}
else
{
$loginform = "<form name=\"form1\" method=\"post\" action=\"\">
<table width=\"100\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td>Gebruikersnaam:</td>
<td><input name=\"username\" type=\"text\" id=\"usern\"></td>
</tr>
<tr>
<td>Wachtwoord</td>
<td><input name=\"pass\" type=\"text\" id=\"pass\"></td>
</tr>
</table>
<input type=\"submit\" name=\"Submit\" value=\"Submit\">
</form>";
echo "$loginform";
if ($_POST[Submit])
{
$query = mysql_query("SELECT * FROM users WHERE gebruiker = '$username'") or die(mysql_error());
$user = mysql_fetch_array($query);
$username = $_POST['username'];
$pass = md5($_POST['pass']);
if (!$user[pass] == $pass)
{
echo "Er klopt iets niet met de ingegeven data<br>";
}
else
{
$query = mysql_query("SELECT * FROM users WHERE gebruiker = '$username'") or die(mysql_error());
$user = mysql_fetch_array($query);
setcookie("id", $user[id],time()+(60*60*24*5));
setcookie("pass", $pass,time()+(60*60*24*5));
echo "je bent nu ingelogd";
}
}
}
?>
Warning: Cannot modify header information - headers already sent by (output started at /home/kaotix/domains/kaotix-crew.net/public_html/bugz.inc/index.php:5) in /home/kaotix/domains/kaotix-crew.net/public_html/bugz.inc/loginform.php on line 39
Warning: Cannot modify header information - headers already sent by (output started at /home/kaotix/domains/kaotix-crew.net/public_html/bugz.inc/index.php:5) in /home/kaotix/domains/kaotix-crew.net/public_html/bugz.inc/loginform.php on line 40
i'm getting that erro but cant see why and there is no whitespace in my code after the or befor the php tags anywhere if you want i can post the index file too
thank you in advance