Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 6 of 6
  1. #1
    Jedi Master
    Bob's Avatar
    Join Date
    Apr 2002
    Posts
    3,133
    DNF$
    49,605
    Bank
    0
    Total DNF$
    49,605
    Donate  

    Quick PHP Question

    I cannot seem to figure out how to do this or find it anywhere.

    I need to open a link in a NEW browser window.

    In HTML, you do it with:

    a href=". . . " target="_BLANK"


    In JavaScript, you do it with:

    window.open(". . . ");

    How do you do this in PHP?

    I tried:
    header('Window-target: NEW');
    header('Location: http://. . . ');

    But I got a "Headers already sent" error in the main document.

    ACK! Help please!

    -Bob
    . . .

  2. #2
    President
    GiantDomains's Avatar
    Join Date
    Sep 2002
    Location
    N-Y-C
    Posts
    6,729
    DNF$
    444
    Bank
    0
    Total DNF$
    444
    Donate  

    Re: Quick PHP Question

    Why don't you just use javascript within the php document? That's the way I do it. Not sure if there is an actual php command, but I guess there must be.
    NETCHEAP - Discount Dotster Reseller - $7.99
    FREE pushes from your dotster account, renew for $7.99! 1. Create a netcheap account. 2. Push from dotster to netcheap account name. 3. Renew for $7.99!

  3. #3
    Platinum Lifetime Member
    Darren06's Avatar
    Join Date
    Sep 2003
    Location
    California, US
    Posts
    1,911
    Country

    United States
    DNF$
    3,298
    Bank
    0
    Total DNF$
    3,298
    Donate  

    Re: Quick PHP Question

    Ah you cant do this in php... its an active element which means it can only be used in browser code.

  4. #4
    Exclusive Lifetime Member
    WebCat's Avatar
    Join Date
    Mar 2003
    Location
    Southern California
    Posts
    1,031
    DNF$
    21,801
    Bank
    0
    Total DNF$
    21,801
    Donate  

    Re: Quick PHP Question

    Quote Originally Posted by Bob
    I cannot seem to figure out how to do this or find it anywhere.

    I need to open a link in a NEW browser window.
    I tried:
    header('Window-target: NEW');
    header('Location: http://. . . ');

    But I got a "Headers already sent" error in the main document.

    ACK! Help please!

    -Bob
    Hey Bob, I'm no php guru, but I think the server is telling you you're resending http headers again, which it sounds like the server doesn't like.

    I would pursue generating an html doc, with a meta equiv tag and research if there's an http header that will open a new window, similar to how the "refresh" will redirect. I definitely don't know what every one of the http headers are and do. I think there's about 60 or so, not including mime type headers.

    Another possibility I'd experiment with would be to use php to generate a javascript doc that in turn executes and opens the new window.

    I don't know if that helps or not. I'm probably more confused than you!

    WebCat
    MetallicaForum.com - DomainElf.com - Exclaims.net
    DomainExpires.com - TouringSound.com - SongNet.us
    SongClick.com - DedicatedTraffic.com - AmericanMovie.us

  5. #5
    Platinum Lifetime Member
    .com.net.org's Avatar
    Join Date
    Oct 2002
    Posts
    1,976
    DNF$
    1,543
    Bank
    0
    Total DNF$
    1,543
    Donate  

    Re: Quick PHP Question

    Try this Bob.

    Code:
    <?php
    echo '<a href="http://www.dnforum.com" target="_blank">www.dnforum.com</a>';
    ?>
    Unlimited Domain Hosting - $20/mo
    Dedicated Server - $99/mo

  6. #6
    Account Terminated
    Join Date
    Feb 2004
    Posts
    4
    DNF$
    262
    Bank
    0
    Total DNF$
    262
    Donate  

    Re: Quick PHP Question

    Drop me a pm if you ever have any PHP-questions or if the above didn't help you out. Am fairly experienced and don't mind helping out! (That goes for all of you)

Similar Threads

  1. PHP question
    By Ciqala in forum Website Development and Design Discussion
    Replies: 12
    Last Post: 03-06-2003, 12:21 PM
  2. Quick .cc question
    By com in forum Domain Name Appraisal Discussion
    Replies: 9
    Last Post: 12-22-2002, 01:27 PM
  3. Quick question - sold a domain
    By President Gringo in forum General Domain Name Discussion
    Replies: 15
    Last Post: 12-13-2002, 04:57 PM
  4. 100 DNF For Quick Answer To Trademark Question From Lawyer
    By Gomains in forum Domain Name Legal Issues
    Replies: 3
    Last Post: 11-23-2002, 12:00 PM
  5. a nice one: mysqlphp.com
    By in forum Domain Name Appraisal Discussion
    Replies: 2
    Last Post: 04-27-2002, 05:29 PM

Bookmarks

Posting Permissions

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

Domain name forum recommended by Domaining.com