title: Converting a PHP variable to a JavaScript variable
body: <p>I am making a pop up window with JavaScript using <code>window.open()</code>. The page to be opened should be stored in a variable. </p>
  
  <p>That variable's name is determined using a PHP <code>&lt;form&gt;</code>. When the user clicks "confirm", it brings them to <code>play.php?name=userinput</code>, and when the <code>window.open</code> function is executed, it currently opens <code>txtone.php</code>. But I want it to open <code>txtone.php?name=userinput</code>, including that argument.</p>
  
  <p>I can retrieve the value from the parent window (<code>name=userinput</code>), using a PHP variable, but I need to transform it into a JavaScript variable, and then use <code>window.open(name);</code> (The variable's name is <code>name</code>).</p>
  
  <p>So I am basically asking how do I convert a PHP variable into a JavaScript variable.</p>