how to change the php variable value in js code example
Example: how to assign value of a js variable to a php variable
<script> document.cookie = "myJavascriptVar = " + myJavascriptVar </script>
<?php
$myPhpVar= $_COOKIE['myJavascriptVar'];
?>