Ilyas Ilyas - 2 years ago 85
PHP Question

how to redirect php page with parameters into new tab or window

I have print option in my application. When user click on print button the print page should be open in another tab/window.

Again I am sending some parameters with print page as it contain dynamic values.

to do so i have used php header as


but it is redirecting in parent page. and javascript as

echo "<script type=\"text/javascript\">".
"'Delivery_form.php?cnno='".$cnno."&copies=".$nocopy ")".

please help me to achieve this funcnality.

Answer Source

The php header should be :



echo "<script type=\"text/javascript\">'Delivery_form.php?cnno=".$cnno."&copies=".$nocopy."', '_blank')
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download