# Header: Opening URL in New Window

**URL:** <https://forum.kirupa.com/t/header-opening-url-in-new-window/293583>\
**Category:** programming\
**Created:** [July 31, 2009, 1:00am UTC](https://forum.kirupa.com/t/header-opening-url-in-new-window/293583 "2009-07-31T01:00:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [July 31, 2009, 1:00am UTC](https://forum.kirupa.com/t/header-opening-url-in-new-window/293583/1 "2009-07-31T01:00:22Z")

</div>

Here’s what I would like to do - open a new window with one URL and update the current window with another:

```auto

    if (@mail($to, $subject, $body, $header))
        {

    header('Location: http://www.mydomain.com/thanks.html');
    header('Location: http://www.myshoppingcart.com/category.sc?categoryId=2; Window-target: _blank');

        }

```

Doesn’t work, of course. The second header is the one that works, but it simply updates the current window (no new window opens).

Thanks for any help.
