I want to pass a variable javascript into variable php. I can’t use $_GET or $_POST because is all loaded by the method load in jquery and I don’t have any form or possbility to implement it.
This is my code:
<script type="text/javascript">
var id= "test";
</script>
<?php $_SESSION['my_page'] =?> + id;
How can I resolve It?
2 solutions
Eighter way you CANNOT mix
javascriptwithPHPlike that.Javascriptis client side,PHPis server side.for jQuery:
and in
yourScript.php