Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Cannont modify header

Parašė Erdfcvxl· 2013 Sau. 11 22:01:20
#1

Sveiki, taigi susiduriau su tokiu erroru

Warning: Cannot modify header information - headers already sent by (output started at /hermes/bosoraweb065/.../custom/mysql.php:1) in /hermes/bosoraweb065/b1043/.../custom/index.php on line 20


<?php
session_start();
include("mysql.php");
 
$psl = (isset($_GET['psl']) ? $_GET['psl'] : "");
if($psl == "login") {
	@extract($_POST);
 
	if (isset($login)) { 
		//unset($_SESSION['er']);
 
		if($username == "") {$_SESSION['er'] = "Please enter Customer's ID";} 
		elseif ($passwort == "") {$_SESSION['er'] = "Please enter Password";}
		else { $row = mysql_fetch_assoc(mysql_query("Select * from users WHERE u_id='$username'"));
 
			if($username == $row['u_id'] && $passwort == $row['u_pass']) {$_SESSION['user'] = $row['id'];}
			else{$_SESSION['er'] = "Customer ID or Password is wrong";}
		}
		if (isset($_SESSION['user'])) {
			header("Location: customer.php");
		} else {
			header("Location: index.php");
		}
	}
}
 
unset($_SESSION['user']);
 
 
include("header.php");
//dar kodo.....
 


Zodziu nera atrodo nieko is echo'inta ankciau negu header komanda panaudota, o errora vistiek meta, gal kas paaiskintu kodel?