I was reading some javascript examples..you should check them out..
you can pass the values back and forth using that..and when u are done..then u can use php to process it....
otherwise..you can you use:
a link to open a new window and pass the variables, then when they are done..
<a href="../newWindow.php?var1=<?echo $var1?>&var2=<?echo $var2?>">Open New window</a>
here is a link to the javascript site..(scroll down...)
http://freeflight.cockpit.be/atasi/divers/cjvscr/faqqa/fform.html
(i am a newbie...someone else might have a better idea...)