Why $_GET won't work with sessions : I'am getting varriable value from other page and why it's not working.
Here is the code:

Page 1:

    <h1 align="center">
    <form name="form" action="" method="get">
    <input type="text" name="wonorlose" id="wonorlose" value="50">
    </form>
    </h1>

    On button push:
    <script>
    function rollHead(){
        var die1 = document.getElementById("die1");
        var status = document.getElementById("status");
        var d1 = Math.floor(Math.random() * 2) + 1;
    	<?php
    	$_SESSION['wonorlose'] = $_GET["wonorlose"];
    	?>
    	if(d1 == 1)
    	{
    	die1.innerHTML = "You lose!";
    	fliped.innerHTML = "Fliped Tail!";
    	var ajax = new XMLHttpRequest();
        ajax.open('POST','lose.php',true);
        ajax.send();
    	}
    	else if (d1 == 2)
    	{
    	die1.innerHTML = "You won!";
    	fliped.innerHTML = "Fliped Head!";
    	var ajax = new XMLHttpRequest();
        ajax.open('POST','won.php',true);
        ajax.send();
    	}
    }
    </script>


Page 2:

    $_SESSION['wonorlose'] = $wonorlose;
    echo $wonorlose;
    mysql_query("UPDATE `users` SET money=money+'$wonorlose' WHERE user_id=".$_SESSION['user']);

P.S rool system works and I get message won or lose but nothing happens in my database...