Page 1 of 1
header problem
Posted: Fri Jun 28, 2002 11:18 am
by prasadharischandra
i used header(location:index.php");
but it didn't redirect to index error massages is
Warning: Cannot add header information - headers already sent by (output started at /web/disk1/virtual/ctrlshops.com/accounts/ctrltrack.com/htdocs/expo/edit_user.php:8)
Quotes?
Posted: Fri Jun 28, 2002 12:13 pm
by icesolid
I looked at the code you entered above, and you put:
include(location:index.php");
The code should be:
Code: Select all
<?php
header("Location: index.php");
?>
Also, you must enter the header(); function before any other code in the document, such as any includes and etc. You can Visit the PHP documentation page on the header(); function here (
http://www.php.net/manual/en/function.header.php) for more information on the header(); function.
Re: header problem
Posted: Fri Jun 28, 2002 12:20 pm
by prasadharischandra
same problem
Hmhm...
Posted: Fri Jun 28, 2002 12:22 pm
by icesolid
The header(""); code must be entered before any other code on the page. Are you sure it is the first line of code.
Make sure it looks like this:
Code: Select all
<?php
header("Location: index.php");
?>
If that still does not work. Make a new PHP document, and enter only these lines of code in the document:
Code: Select all
<?php
header("Location: index.php");
?>
Then save and upload it and access the file, and if you are redirected right to index.php, then there is something else wrong in your PHP code.
Posted: Fri Jun 28, 2002 3:45 pm
by volka