Re: Redirect problem

From: Date: Mon, 28 Aug 2000 21:34:44 +0000
Subject: Re: Redirect problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-14010@lists.php.net to get a copy of this message
On Mon, 28 Aug 2000, Martin A. Marques wrote: > On Mon, 28 Aug 2000, O.J. Alcaraz wrote: > > > I am having trouble with a simple redirect. I am just doing a basic form > > where the user enters data, submits it, and then gets redirected to another > > page. I got this to work but after I implemented using some include files, > > etc. I get the header error. I don't really know why I get the error. The > > beginning of my code looks like this: > > > > <?php > > require "constants.inc.php"; > > require "functions.inc.php"; > > > > db_connect(); > > > > if($submit) > > { > > $sql = "INSERT INTO news (user_id, headline, date, body) VALUES > > ($user_id, '$headline', NOW(), '$body')"; > > $result = db_query($sql); > > header("Location: index.php"); > > } > > include "header.inc"; > > ?> > > Try putting @ in front of the functions that connect and send the query > to the database. There could be outputs there (in case of errors). > Actually if there were errors being outputted to the browser, he would know that that was the problem, because that would be readable in his browser. This is probably just a whitespace being outputted somwhere in those two include files. Regards, Joao -- Joao Prado Maia Web Developer Kefta.com, Inc

« previous php.general (#14010) next »