how to get a value from javascript to 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>";
?>