how to pass javascript variable value to php in separate page code example
Example: how to use javascript variable in php
<script>
var p1 = "success";
</script>
<?php
echo "<script>document.writeln(p1);</script>";
?>
<script>
var p1 = "success";
</script>
<?php
echo "<script>document.writeln(p1);</script>";
?>