I dont quite get what you mean. Can eleborate further?
Any, here is the idea of what i am doing.
1.When user come into this form, obviously there is no item yet so nothing is being display except the form fields.
2. User will then enter their details.
3. Then he will click on the Add Item link to open a NEW WINDOW which is also another form to enter the item details.
4. In the item form, he will key in the item desc and then click on the Add button.
5. The data will then be collected at the to_session.php page and then will be inserted into session variables accordingly.
6. After that, a msg will appear saying added bla bla bla, and the a button below.
<input name="button" type="button" value="Close" onClick="opener.location.reload(); self.close()">
7. When click then main.php will be reloaded to display the form with the user details and items added. But how to retain the user details?
"main.php"
<form name="form1" action="process.php" method="post">
<input type="text" name="name" value="">
<a href="javascript: open_window5('additem.php?add=1')" target="_self" >Add Item</a>
</form>
"additem.php"
<form name="form2" action="to_session.php" method="post">
<input type="text" name="item" value="">
<input type="submit" value="Add">
</form>