PHP Redirect with target="_blank". Is it Possible?

Discussion in 'PHP' started by Masterful, Feb 23, 2009.

  1. #1
    Is it possible to incorporate target="_blank" into a PHP redirect:

    <?php
    
    header("Location: http://www.example.com");
    
    ?>
    PHP:
    I've tried it but it didn't work.

    I know that target="_blank" is no longer valid, but I need to redirect and open a new window.

    If I can't incorporate target="_blank" into a PHP redirect, how else can I open a new window without Javascript?
     
    Masterful, Feb 23, 2009 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    No, you cannot open new windows (nor should you) with a PHP header.
     
    Danltn, Feb 23, 2009 IP
  3. ActiveFrost

    ActiveFrost Notable Member

    Messages:
    2,072
    Likes Received:
    63
    Best Answers:
    3
    Trophy Points:
    245
    #3
    header describes your current windows content - that means .. no new windows or something else !
     
    ActiveFrost, Feb 23, 2009 IP