I have some JavaScript variable in the parent browser window and now I want to open a new window(an existing php file) by clicking a certain button and pass those variable to the opened page. I know I can achieve that by GET method and I just wonder if there is a clearer way I can do it so I don't have to append the variable value at the end of the URL. I also searched on google and SO, someone suggested using window.opener somehow it seemed not to apply to php. I'm still a newbie. Any help is appreciated. Thanks in advance.
scripts in the opener page
var newWindow = window.open ("myfile.php" ,"_blank");
newWindow.var1="hello";
newWindow.var2="world";
myfile.php
//Is it possible to use the variables in php page as below?
window.opener.var1;
window.opener.var2;