title: Get JS varible to PHP variable with an onclick function
body: <p>I want to have a button that run my js function onclick and take the variable data and send it to result.php file. How can i do that</p>
  <p>My code simplified:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function Run() {
    var Variable0 = document.getElementById("ElementX");
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form action="result.php" method="GET"&gt;
    &lt;button class="CLASSx" id="IDy" onclick="Run()"&gt;CLICK&lt;/button&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>