title: Can I use window.open to open an existing php file and pass a javascript variables to that php page?
body: <p>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.</p>
  
  <p>scripts in the opener page</p>
  
  <pre><code>var newWindow = window.open ("myfile.php" ,"_blank");
  newWindow.var1="hello";
  newWindow.var2="world";
  </code></pre>
  
  <p>myfile.php</p>
  
  <pre><code>//Is it possible to use the variables in php page as below?
  window.opener.var1;
  window.opener.var2;
  </code></pre>