Reputation: 367
<?php
$_SESSION['dsize'] = $_POST['dsize'];
if ($_SESSION['deadline']=="Urgent" )
{
?>
<script type = "text/javascript">
window.open('https://usd.swreg.org/cgi-bin/s.cgi?s=104597&p=104597-1&v=0&d=0&q=<?php echo $_SESSION['dsize']?>');
</script>
<?php
}
else
{
?>
<script type = "text/javascript">
window.open('https://usd.swreg.org/cgi-bin/s.cgi?s=104597&p=104597-2&v=0&d=0&q=<?php echo $_SESSION['dsize']?>');
</script>
<?php
}
header('Location: confirmorder.php');
?>
if i delete the last header line new window is opening but if i use the header line new window does not open and confirmorder.php is opened.
can anyone tell me how to open new window for checkout and send the user to confirmorder page.
Thanks
Upvotes: 1
Views: 5264
Reputation: 11
Usually in works I use this code
function openNewTap(string $url)
{
echo '<script type="text/javascript">';
echo 'window.open("'.$url.'");';
echo '</script>';
}
Upvotes: 1
Reputation: 234
Maybe you should use Javascript to redirect the client to the page you want.
At the end of the response, you should do something like:
<script type="text/javascript">
<!--
window.location = "confirmorder.php"
//-->
</script>
Upvotes: 2