zarfan Posted August 4, 2006 Share Posted August 4, 2006 Hi,i would like to make a php popup window based on some information from a formcurrently a value is passed into the PHP script then i am forwarwed to another another sitemy script is as follows<?php [code]@$productID = addslashes($_POST['productID']);if (strlen($productID) == 0 ){die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Invalid productID</font></p>");}header("Location: products/$productID/index.html'");?>[/code]but i now i would like to change this abit so that the productID page is opened in a new popup window and that and i return to my last viewed page, can anyone code this small script for me pleasethanks Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted August 4, 2006 Share Posted August 4, 2006 use javascript...[code]die("<script>window.open(urlgoeshere,'','parametersgohere')</script>");[/code]Refer to one of the millions of pages for the arguements for window.open...such as:http://www.javascripter.net/faq/openinga.htm Quote Link to comment Share on other sites More sharing options...
zarfan Posted August 5, 2006 Author Share Posted August 5, 2006 hi i tried what you said but it didnt work, here is my code now[code]<?php@$productID = addslashes($_POST['productID']);if (strlen($productID) == 0 ){die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Invalid productID</font></p>");}die("<script>window.open(products/$productID/index.html,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=800,height=600')</script>");?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.