how to give javascript value to php variable code example
Example: js var to php
<script>
var res = "success";
</script>
<?php
echo "<script>document.writeln(res);</script>";
?>
<script>
var res = "success";
</script>
<?php
echo "<script>document.writeln(res);</script>";
?>