Possible Duplicate:
javascript variable into php
Okay lets imagine I’ve a javascript variable “x”
<script>
var x="jsvar";
</script>
Now I want its value in php variable $y <?php $y; ?> How to do it.
Okay few people are confused i wanted to know is it possible if yes then how ??
if this isn’t possible then comment here i’ll remove it.
You have to pass it to your PHP script, either via AJAX or via a formular with a submit button.
And the PHP script can look like this: