CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   PHP code help (http://www.codingforums.com/showthread.php?t=282335)

roybarton 11-16-2012 07:26 AM

PHP code help
 
I need to set the hyperlink in the following code to open in a new window, any advice?

$b8 = "Permit" ; $l8 = "http://www.mcfederation.com/FORMS/PERMITAPPLICATIONFORM.aspx"; $w8 = 91;

mlseim 11-16-2012 07:29 PM

You can't use PHP header to open URL in new window.
This is something that happens "client side", not "server side".

I have a question though ...

You're opening the new window from where?

If you're on a page and execute a PHP script, the server will overwrite your current page.

Or maybe you mean opening the URL in a new window with a link?
Is that what you mean?

A link like this?
PHP Code:

<?php

$b8 
"Permit" $l8 "http://www.mcfederation.com/FORMS/PERMITAPPLICATIONFORM.aspx"$w8 91;

echo 
"<a href='$l8' target='_blank'>Open Page in new window</a>";

?>


If it's not opening a new window with an HTML link, you'll need to use javascripting or AJAX.



.


All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.