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)
header problem
Moderator: General Moderators
-
prasadharischandra
- Forum Commoner
- Posts: 57
- Joined: Thu May 09, 2002 2:19 am
- Location: sri lanka
- Contact:
Quotes?
I looked at the code you entered above, and you put:
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.
The code should be:include(location:index.php");
Code: Select all
<?php
header("Location: index.php");
?>-
prasadharischandra
- Forum Commoner
- Posts: 57
- Joined: Thu May 09, 2002 2:19 am
- Location: sri lanka
- Contact:
Re: header problem
same problem
Hmhm...
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:
If that still does not work. Make a new PHP document, and enter only these lines of code in the document:
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.
Make sure it looks like this:
Code: Select all
<?php
header("Location: index.php");
?>Code: Select all
<?php
header("Location: index.php");
?>and please read the sticky thread about header-informations