how to transfer variable from js to php 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>";
?>