header felj
Warning: Cannot modify header information - headers already sent by (output started at c:\AppServ\www\new gongo\PhP\index.php:134) in c:\AppServ\www\new gongo\PhP\login.php on line 27<?php session_start(); ?>
<form method="POST" action="<?php echo $_SERVER['REQUEST_URL']; ?>">
<input name="brugernavn" value="brugernavn"><br>
<input name="kodeord" value="kodeord" type="password"><br>
<input name="send" value="send" type="submit">
</form>
<?
if (isset($_POST['send'])) {
include('include/connect.php');
$result = mysql_query("select * from bruger_id where brugernavn = '{$_POST['brugernavn']}'")
or die (mysql_error());
$row=mysql_fetch_assoc($result);
if ( $row['brugernavn'] == $_POST['brugernavn'] AND $row['kodeord'] == $_POST['kodeord'] ) { $_SESSION['id'] = $row['id'];
$_SESSION['adminlvl'] = $row['adminlvl'];
$_SESSION['lvl'] = $row['lvl']; }
else { echo "buger navn og kode passer ikke sammen"; }
}
header("Location: index.php");
?>