Reputation: 129
I want to redirect current page to other page i use this code but its not working
if($abc=="doc" || $abc=="docx" || $abc=="rtf")
{
header("Location: abc.php");
}
AND
if($abc=="doc" || $abc=="docx" || $abc=="rtf")
{
echo "<meta http-equiv='refresh' content='0;url=abc.php'>";
}
Upvotes: 0
Views: 125
Reputation: 122
header() should work. However, it must be the first output of your script. If anything is sent before, it will not be taken into account. Check that the php script doesn't echo anything. Even newlines before the initial
Upvotes: 1