Getting Warning message when using header('Location: thank.php');
Posted by: nasreen_laghari (---.popl.cable.ntl.com)
Date: February 11, 2008 03:00AM

Hi All,

I'm trying to redirect one page to other by using header('Location: thank.php'); but getting below error:

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\gigs\feedback.php:6) in C:\wamp\www\gigs\header.php on line 35

i'm not using any other header anywhere and program runs perfect if i commit this header line.

Could any one please suggest me why this is happening?

Regards

Nasreen

Options: ReplyQuote
Re: Getting Warning message when using header('Location: thank.php');
Posted by: yfastud (Moderator)
Date: February 11, 2008 03:32AM

Did you have that include line before everything? If not, the header already sent is exactly as error message stated

Happy Lunar New Year ;-) ;-) ;-)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Getting Warning message when using header('Location: thank.php');
Posted by: nasreen_laghari (---.popl.cable.ntl.com)
Date: February 12, 2008 12:32AM

Actually My Feedback page is calling a method which is in header.php (this page contains all methods). In that method I have

header("Location: thank.php"winking smiley;

Also Feedback.php and Header.php both includes php pages such as :

include("dbconnect.php"winking smiley;

Options: ReplyQuote


Sorry, only registered users may post in this forum.