ik krijg steeds dit probleem: Warning: Cannot modify header information - headers already sent by (output started at /srv/disk6/1501985/www/wmhelp.co.nf/nl/login/index.php:169) in /srv/disk6/1501985/www/wmhelp.co.nf/nl/login/index.php on line 190
Dit is mijn script:

<?php
session_start();
if (isset($_SESSION['ingelogd'])) {
	header('location: member.php');
} else {
	?>
    
	<!doctype html>
	<html>
	<head>
	<style>
	*{margin:0;padding:0;}
*:focus{outline:none;}

h2 {
margin: 0;
 font-size: 3em; 
 line-height: 1em; 
 margin-bottom: 0.5em
 }
 
h3 {
margin: 0;
 font-size: 2.25em;
 line-height: 1.3333333333333333333333333333333em;
 margin-bottom: 0.6667em
 }
 
h4 {
margin: 0; 
font-size: 1.5em; 
line-height: 1em; 
margin-bottom: 1em
}

h5 {
margin: 0;
 font-size: 1.3125em; 
 line-height: 1.1428571428571428571428571428571em;
 margin-bottom: 1.1428571428571428571428571428571em
 }

body{
	background:#e4a090;
	font-size: 16px;
	font-family: Arial, Helvetica, sans-serif;
}

.tel {
	color:#000
}


a {
	text-decoration:none
}


img {
	border:none
}


#ssssnake {
	display: block;
	text-align: left;
	background: #ed9780
}


#card {
    margin:1 , 1;
    position:relative;
	display:block; 
	width:350px; 
	min-height:120px; 
	background:#f8f8f5;
	margin:50px auto 0px;
}
#card2 {
    margin:1 , 1;
    position:relative;
	display:block; 
	width:350px; 
	min-height:10px; 
	background:#f8f8f5;
	margin:50px auto 0px;
}


header {
	text-align:center;
	display:block; 
	position:relative; 
	width:400px; 
	height:280px; 
	padding:60px 100px 0px;
	margin:0px auto
}


header h1 {
	display:block; 
	margin:10px 0px 0px 0px; 
	border:none;
	color:#8e3633;
	font-size:38px
}


header h2 {
	color: #ffffff; 
	font-size:38px
}


header h2:hover {
	text-decoration:underline; 
	color:#998dc9; 
	cursor:pointer
}


header h3 {
	display:block;
	font-size:18px;
	margin-top:10px
}

footer {
	width: 100%;
height:100%;
background:#000;
display:block;
float:left;
}

p {
color:#000000;
text-align:center;
padding:30px 0px 0px 0px;
}

#container {
	width: 100%;
	overflow:hidden;
	min-width:960px;
}
#left {
	float: left;
	width: 50%;
	display: inline;
}
#right{
	float:right;
	width: 50%;
	display: inline;
}
bericht {
	display:block; 
	width:100px; 
	height:100px;
}
	</style>
	<title>WMHelp</title>
	</head>
	<body>
	
	<?php
	if (isset($_POST['hidden'])) {
		include "mysql_connect.php";
		
		//variable
		$gebruikersnaam = mysql_real_escape_string($_POST['gebruikersnaam']);
		$wachtwoord = mysql_real_escape_string($_POST['wachtwoord']);
		
		$sql = "SELECT * FROM login1 WHERE gebruikersnaam='".$gebruikersnaam."' AND wachtwoord='".$wachtwoord."'";
		$query = mysql_query($sql);
		$num = mysql_num_rows($query);
	
		if($num == 1) {
			//Ingelogd
			$sql2 = "SELECT * FROM login1 WHERE gebruikersnaam='".$gebruikersnaam."' AND wachtwoord='".$wachtwoord."'";
			$query2 = mysql_query($sql2);
			$fetch = mysql_fetch_assoc($query2);
			
			$_SESSION['gebruikersnaam '] = $gebruikersnaam;
			$_SESSION['id'] = $fetch['id'];
			$_SESSION['ingelogd'] = true;
			exit(header('location: member.php'));
		} else {
			echo "Gebruikersnaam of wachtwoord is verkeerd";
		}
	
	
	} else {
		?>
        			
        <div id="card">		
		<form action="index.php" method="post">
			<div id="left">
			Gebruikersnaam:<br>
			<input type="text" name="gebruikersnaam" /><br>
			</div>
			<tr/>
			<div id="right">
			Wachtwoord:<br>
			<input type="password" name="wachtwoord" /><br>		
            </div>		
            <div id="left">	
			<input type="hidden" name="hidden">
			</div>
			<center><input type="submit" value=" Login " width="100">&nbsp;&nbsp; <a href="./register.php"><font color="red"> Registreer </font></a></center>
		</form>
		</div>
		<?php
	}
}
?>

</body>
</html>

Kunnen jullie mij verder helpen?
Groetjes Arne
Ik heb gekeken op mijn site en het werkt en dat vind ik goed genoeg.
Je formulier staat vóór je html.
En op een fiets met twee lekke banden kan je ook rijden ...
oeh santhe, dat is een oude site :)

Gebruik liever http://sceneone.nl (alsnog niet de modernste, maar ten minste redelijk up to date)

Reageren