Have a great day everyone!
In one of the php scripts there is such a moment:

header("Location: 123.php"); 

Everything works fine: the jump occurs, but it became necessary to open 123.php in a new window, how to implement this?

  • echo '<script type="text/javascript">window.open("123.php");</script>'; - the only way. If it's not a secret, can you find out the logic of your script? - ling
  • The logic is simple. )) There is a form - it is filled by the user, after clicking the send button, the user gets to the page with the results of processing the data entered by him, and it is required that he stay on the page with the form, and the result of processing opens in a separate window or tab ... - mixerden

2 answers 2

Write the form target="_blank" - and that's it. =)

  • At first I looked in this direction, this is what is needed, but the problem is that in this case I will display the entire page with the form, and then the result of the processing, but only the result is needed. Although I will experiment tomorrow, and now my head is completely does not cook)) - mixerden
  • Actually, the head earned, did)) Thank you) Please transform in response to a comment about the target, so that it can be taken. - mixerden

This is only possible in javascript.

Window open () Method

The open () method opens a new browser window.

  • I know about this method ... Is it really different? - mixerden
  • You can also set the target = "_ blank" property for the link, then when you click on it, a new window will open. In another, unfortunately (or rather fortunately), no way. - Ilya Pirogov