Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: PHP code help

  1. #1
    New to the CF scene
    Join Date
    Nov 2012
    Thanked 0 Times in 0 Posts

    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;

  2. #2
    Master Coder
    Join Date
    Jun 2003
    Cottage Grove, Minnesota
    Thanked 1,111 Times in 1,102 Posts
    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:

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

    "<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.

    Last edited by mlseim; 11-16-2012 at 08:50 PM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts