How can I use PHP to open a URL in a new or existing browser window?
Thanks FJ
This is an HTML question, not PHP
<a href="http://www.whatever.com" target="_blank">link to whatever</a>
I'm not trying to create a link. I am trying to have the PHP code decide which page to open then open it in a broswer. For example:
if (true) { openURL("http://1.html""); } else { openURL("http://2.html""); }
for that you'll have to use the header() function:
<? if (true) { header ('location: http://1.html'); } else { header ('location: http://2.html'); } ?>
make sure there is nothing output to the browser before you call the header function (not even whitespace)
Thanks! I'll give it a try...
FJ
Actually, you can't. JavaScript is the answer here, not PHP. Repeat after me: PHP is server side. It can't control your browser (disregarding cookies and header redirecting).
-L-