kred
05-05-2004, 04:22 AM
hi all,
I have a form, that links to a product pop up window, the pop up has product choices, when they select the product they want and then submit it, how do I get the original page(the parent) page to reload with the new product selection? I'm using $_SESSION['product'] to capture the value. but can't get it to update the info on the form page.
I know it's shouldn't be this difficult, but it my first real go at PHP, any help would apperciated, here is my code I'm using:
form page:
session_start();
if ($_SESSION['select']= $_GET['product']); //get product from pop up if nothing put A
else
$_SESSION['select']="A";
pop up page:
<?php
session_start();
if ($_SESSION['select'] = !isset($_POST['product'])? NULL : $_POST['product']); //store selected product on submit if nothing put A
else
$_SESSION['select']= "A";
?>
selector:
<SELECT NAME= "product">
<OPTION VALUE="<? echo $_SESSION['select']; ?>" SELECTED><? echo $_SESSION['select']; ?>
<OPTION VALUE=B>B
<OPTION VALUE=C>C </option></select>
How do I get the info back into the form, what I'm I missing
any help would be great
K
I have a form, that links to a product pop up window, the pop up has product choices, when they select the product they want and then submit it, how do I get the original page(the parent) page to reload with the new product selection? I'm using $_SESSION['product'] to capture the value. but can't get it to update the info on the form page.
I know it's shouldn't be this difficult, but it my first real go at PHP, any help would apperciated, here is my code I'm using:
form page:
session_start();
if ($_SESSION['select']= $_GET['product']); //get product from pop up if nothing put A
else
$_SESSION['select']="A";
pop up page:
<?php
session_start();
if ($_SESSION['select'] = !isset($_POST['product'])? NULL : $_POST['product']); //store selected product on submit if nothing put A
else
$_SESSION['select']= "A";
?>
selector:
<SELECT NAME= "product">
<OPTION VALUE="<? echo $_SESSION['select']; ?>" SELECTED><? echo $_SESSION['select']; ?>
<OPTION VALUE=B>B
<OPTION VALUE=C>C </option></select>
How do I get the info back into the form, what I'm I missing
any help would be great
K