PHP Header redirection

When using either of the following headers, can you make it open in a new window? (i.e. target=_blank)?????



header('Refresh: 5; url=');

Probably very easy, just can't put my finger on it,

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nope not to my knowledge, you'll need to use some javascript to do that. and i don't think your 2nd header syntax is correct - that looks like a javascript-esque string in a php function to me

first page:

// your code
header("Location: example.php");


<script language="JavaScript">
function open_window(theURL,winName,features) {
<body onLoad="open_window('','example','scrollbars=yes,width=720,height=550,resizable=yes');">
// your second page goes here

hope that helps


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You could aslo try

  <META HTTP-EQUIV="Refresh" CONTENT="3; TARGET=_blank; URL=">

- Daniel
you can't do it with headers or with a refresh.
You will have to use some sort of client side scripting like javascript.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.