Jump to content

Problem with: "header("Location: http://www.mysite.com/index.php");" ?


Solarpitch

Recommended Posts

Hey guys,

I am want to use the following code at the end of a page to send the user to the home page based on the result of an if/ esle. I keep getting the message, header already sent!

[code]
if //true
{

header("Location: http://www.mysite.com/index.php");
}

esle
{
//something
}
[/code]

Is there any way around this?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.