title: Assign JavaScript Variable value into PHP Variable
body: <p>I have this JavaScript below which does few things on my website. I need to assign the value from JavaScript into PHP Variable to be used in a SESSION.</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
          function CallbackReverse(what) {
              rand = get_rand();
              text = "416-05-201-XXX";
              text = text.replace("XXX", rand);
              //Store it in session
              &lt;?php $_SESSION["pin_number"] = "text"; ?&gt;
          }
      &lt;/script&gt;
  </code></pre>
  
  <p>Please help. </p>