How to pass JavaScript variables to PHP?

PHPServer Side ProgrammingProgramming

You can easily get the JavaScript variable value on the same page in PHP. Try the following codeL.

<script>
   var res = "success";
</script>
<?php
   echo "<script>document.writeln(res);</script>";
?>
raja
Published on 18-Jan-2018 08:24:09
Advertisements