problem with header()

From: Date: Wed, 04 Oct 2006 08:51:07 +0000
Subject: problem with header()
Groups: php.db 
Request: Send a blank email to php-db+get-42476@lists.php.net to get a copy of this message
Hello thanks for your helping. But several things I already have checked. How I could force my code to make header() call effective. > On 10/4/06, j.kuehne@sign-tronic.ch <j.kuehne@sign-tronic.ch> wrote: > > Hi > > > > I can not submit any header() information in the following context. > > What is wrong within the code? > > > > <?php > > > > require_once "includes/db.inc"; > > require_once "HTML/Template/ITX.php"; > > > > if (!($connection = @ mysql_connect($hostname, $username, $password))) > > die("Could not connect to database"); > > > > $status = mysqlclean($_GET, "status", 1, $connection); > > $template = new HTML_Template_ITX("./templates"); > > $template->loadTemplatefile("form2tpl.tpl", true, true); > > > > > > $template->setCurrentBlock("success"); > > $template->setVariable("AUTOR", $_REQUEST["autor_eb"]); > > $template->setVariable("STICHWORT", $_REQUEST["stichwort_eb"]); > > $template->setVariable("DATUM", $_REQUEST["datum_eb"]); > > $template->setVariable("ANLAGE", $_REQUEST["anlage_eb"]); > > $template->setVariable("PROBLEM", $_REQUEST["problem_eb"]); > > $template->parseCurrentBlock(); > > $template->show(); > > > > > > session_start(); > > > > foreach($_POST as $Key => $Value) { > > $_SESSION[$Key] = $Value; > > } > > > > if ($_POST['submit'] == "Eintrag Bearbeiten"){ > > header("Location: > > http://127.0.0.1/www2/knowledge_db/knowbase02.php"); > > exit; > > } > > ?> > > > > Best regards, Joerg Kuehne > > There must be NO output to the user, before any header(); calls. > 1) Check the files you require() for any whitespaces before the <? tag Already checked > 2) IF $template->show(); does what it says, you must start the session > before that call. I have correct that, but without success > 3) Good luck :) thanks, is what I am need. Best regards, Joerg Kuhne To: erazorbg@gmail.com Cc: php-db@lists.php.net

« previous php.db (#42476) next »