I want to get the value into php variable from javascript
if i do like this
it works.
but,
i want to do like this
it wont work. how can i do this?
if i do like this
Code:
<script> var res = 50; </script>
PHP Code:
<?php echo "<script>document.write(res);</script>"; ?>
but,
i want to do like this
Code:
var res=0; function add() { res =8; } </script>
PHP Code:
<?php echo "<script>document.write(res);</script>"; ?>
Comment