I am calling child page and posting the form. Trying to refresh and rebuild the parent page based on value entered in child page. I am not able to see the child posted values in Parent page.
Expecting value $_POST['test_2'] populated when child is submitted from Parent page. I don't see the value posted by child page in parent page. See the code example below. Thanks for your help.. Advice me if there are any other better way to access the value submitted by child page and rebuilding the parent page using those child page values.
Parent Page is : Example1Parent.php
<html>
<head>
<body>
<h1> Welcome Parent </h1>
<div id="dateDiv"></div>
<form method=post action='' name=f1>
<table border=0 cellpadding=0 cellspacing=0 width=550>
<tr>
<td ><font size=2 face='Verdana'>Refresh upon Search</font>
<input type=hidden name='p_name2' id=n2 size='8'>
<input type=button
onClick=window.open("Example1Child.php","Ratting","width=550,height=170,left=150,top=200,toolbar=0,status=0,"); value="Advanced Search">
<?php
echo '<br> Welcome ';
if (!isset($_POST['test_2'])) echo "<br> t_test2 : it does not exists! ";
?>
</td></tr>
</table>
</form>
</body>
</html>
Child Page is :Example1Child.php
<html>
<head>
<title>ChildForm</title>
<SCRIPT language=JavaScript>
<!--
function win(){
window.opener.location.href="Example1Parent.php";
self.close();
//-->
}
</SCRIPT>
</head>
<body>
<h1> Welcome to Child </h1>
<form name="child" id="child" METHOD="POST" action=''>
<input type="text" id="test_2" name="test_2" value="ENTER DATA TO PARENT PAGE">
<INPUT TYPE="SUBMIT" onClick="win();" value="SEND VALUE TO PARENT">
</form>
</body>
</html>