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.
<script type="text/javascript">
function CallbackReverse(what) {
rand = get_rand();
text = "416-05-201-XXX";
text = text.replace("XXX", rand);
//Store it in session
<?php $_SESSION["pin_number"] = "text"; ?>
}
</script>
Please help.