Home » Php » php – Header Location in new tab

php – Header Location in new tab

Posted by: admin July 12, 2020 Leave a comment


Possible Duplicate:
redirect in a new window

Please don’t mind if it is foolish question,

Is it possible in php to open a window in new tab using

  header(Location: 'blahblah');
How to&Answers:

No, it is not possible. The header will simply redirect the current page, in the current window/tab.


No it is not possible using php as php is a server side language and what you are want is a client side feature. So you will have to do it with some javascript.

You can definitely try something like this via javascript

<script type="text/javascript" language="Javascript">window.open('http://www.example.com');</script>