I'm wondering if it's possible to store a number generated from a javascript script into a PHP SESSION variable. I basically want to store my code '+.res.id+' and '+.res.level+' into a PHP SESSION. Those 2 javascript codes generate a random number and inputs that number in a html form. IS there anyway I could take that number and store it in a PHP SESSION? For example
<script>
JAVASCRIPT CODING
'+res.level+'
'+res.id+' // BTW it actually does generate a number I just can't echo it in another page or store it in a SESSION
</script>
<?php
$_SESSION['.res.id.'] = $idnum;
$_SESSION['.res.level.'] = $levelnum;
?>
Then after in a seperate page I want to call that SESSION and echo the number that the code generated. But my only problem is that when I echo the $_SESSION it echo's as ".res.id." instead of the randomly generated number. How do I fix this to make it echo the random generated number?