Hi
I have a form in parent php page
Code:
Code:
<form name=add>
<input type=hidden name=cus>
</form>
In child window i have a form like this
Code:
Code:
<form name=sub method=post action="<?php echo $PHP_SELF;?>" onsubmit="jss()">
<input type=text name=ss>
<input type=text name=cc>
<input type=submit value=run>
</form>
I have posted the values and stored it in a array as follows
Code:
$ss=$_POST['ss'];
$cc=$_POST['cc'];
$array=array($ss,$cc);
I used javascript function to set the array values to the hidden field in parent window.
Code:
Code:
function jss()
{
window.opener.document.add.cus.value="<?php echo base64_encode(serialize($array));?>";
}
When i post the values of hidden field in parent window
Code:
Code:
$arr=unserialize(base64_decode($_POST['cus']));
The values are assigned when i click the submit button of the child window twice.I want to set the values when submit button is clicked only once.
Pls help........
Regards
Rekha