I know that there are lots of duplicate questions like mine but I couldn't find any solution. I'm having trouble with opening a new tab in my code. I want to open a new tab - not a window - without any click on any button, and I need it to run automatically.
This is my code but it open's a new window instead of a new tap.
code:
if (isset($_POST['check'])){
?><script>window.open('reports/education_efficacy.php','_blank');</script><?php
}
meta refresh version: (it redirects to the target page in the same page, and I wonder is there any way to redirect to a new tab?)
if (isset($_POST['check'])){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=javascript:window.open('reports/relation_with_health.php\','_new');\">";
}