PHP variable to Javascript variable
<p>I am currently working on making a simple php script to edit certain aspects of a game in JavaScript. When attempting to pass variables from the script to the game using forms, the variable data does not seem to transfer. As of now, the script is meant to edit the RDG value of one player in the game. The code is as follows:</p>

<p>script.php:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Form&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;form method="get" action="tron2.html"&gt;


&lt;p&gt;What are your player 1's RGB values:
&lt;input type="text" name="color1r" /&gt; Red 
&lt;input type="text" name="color1g" /&gt; Green 
&lt;input type="text" name="color1b" /&gt; Blue &lt;/p&gt;

&lt;input type="submit" value="Submit" /&gt;

&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>And the portion of the code in javascript where variables are assigned</p>

<pre><code>&lt;?php

$color1r = $_POST["color1r"];
$color1g = $_POST["color1g"];
$color1b = $_POST["color1b"];


?&gt;


&lt;HTML&gt;
    &lt;HEAD&gt;
    &lt;TITLE&gt;
        Tron2 
    &lt;/TITLE&gt;
    &lt;script&gt;
                    var x = "&lt;?=  $color1r; ?&gt;";
                    var y = "&lt;?=  $color1g; ?&gt;";
        var z = "&lt;?=  $color1b; ?&gt;";
                     //more code for the game
</code></pre>

<p>When the game runs, the color of the player stays black, so the values of x,y,z must all be 0. Is there any reason why the values aren't being passed?</p>
