PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
dude81
Forum Regular
Posts: 509 Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City
Post
by dude81 » Wed Oct 19, 2005 2:42 am
Hello,
my headers are not working
Ill put one such logic
Code: Select all
if($parameter=="upcoming_events")
{
echo "upcoming";
header("Location:dsa_events_reservations.php?upcoming_events='YES'");
}
I can see only that echo message . Also I dont even get a notice header already passed.
Thank You
Sai Krishna
mickd
Forum Contributor
Posts: 397 Joined: Tue Jun 21, 2005 9:05 am
Location: Australia
Post
by mickd » Wed Oct 19, 2005 4:16 am
check out
Error Reporting
and set it to E_ALL
also its a good idea to set die() after header redirections to stop anything else from getting executed after it.
also are you sure you want quotes around the YES?
thomas777neo
Forum Contributor
Posts: 214 Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa
Post
by thomas777neo » Wed Oct 19, 2005 4:59 am
Dont echo anything before using the header function
dude81
Forum Regular
Posts: 509 Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City
Post
by dude81 » Wed Oct 19, 2005 5:29 am
E_ALL is given but still there is no error reporitng Im echoing a value and after echoing it stops, but ehcoing is given for testing
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Oct 19, 2005 6:49 am
full uri is required for many servers and browsers for header redirection.