I need to open a new link automatically inside
if(isset($_POST['download'])) {
...
}
after user clicks on submit button download.
I tried document.location, but it opens a link in the same tab, and window.open requires that the browser should have pop-ups enabled, which can be annoying to users, plus in Chrome (may be also in some other browsers), target="_blank"
opens a link in new window, not in a new tab.
Is there anything I can use to open a window normally in a new tab, like with <a href=""></a>
?