Jump to content

PHP popup with input from a form


zarfan

Recommended Posts

Hi,

i would like to make a php popup window based on some information from a form

currently a value is passed into the PHP script then i am forwarwed to another another site

my 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 please

thanks



Link to comment
Share on other sites

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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.