how to pass js value in php 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>";
?>