Answers for "how to pass a value from js to a variable in php"

PHP
6

pass php variable to javascript

//passing PHP variable to JavaScript
var myJSVar = <?php echo json_encode($myPHPVar); ?>;
Posted by: Guest on August-05-2019
0

how to assign value of a js variable to a php variable

<script> document.cookie = "myJavascriptVar = " + myJavascriptVar </script>
<?php
     $myPhpVar= $_COOKIE['myJavascriptVar'];
?>
Posted by: Guest on May-04-2020

Code answers related to "how to pass a value from js to a variable in php"

Browse Popular Code Answers by Language