note 40143 added to function.header

From: Date: Mon, 23 Feb 2004 13:28:52 +0000
Subject: note 40143 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-65587@lists.php.net to get a copy of this message
Hi, I got a problem with headers. If i am logged out of a secured site i got a problem like you see below: Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site257/fst/var/www/html/connection.php:10) in /home/virtual/site257/fst/var/www/html/login_2.php on line 15 the page is: <?php session_start(); if(!empty($_POST)){ include("connection.php"); $query = "SELECT * FROM users WHERE email='" . $_POST["email"] ."' AND sifre='". $_POST["sifre"] . "'"; $result = mysql_query($query); if(mysql_num_rows($result) > 0){ $user = $_POST["email"]; $sifre = $_POST["sifre"]; $_SESSION['user'] = $user; $_SESSION['sifre'] = $sifre; header("Location: beveiligd.php", FALSE); exit(); } else { $text = "Yanlis e-mail veya tel girdiniz! <A onclick='javascript: window.back();'>geri</A>"; die($text); } } else{ //pagina verkeerd aangeroepen header("Location: login.php", FALSE); }?> what can i de? Regards A. Pehlivan ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40143 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40143&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40143&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#65587) next »