Good afternoon, classmates, I have a problem, I hope you can support me, I need to pass data stored in a variable using JavaScript to PHP, how can I do that? I came up with the following but I see that you can not:
<body>
<script>
var miVariable = "Hola Mundo";
</script>
<?php
$datos = "<script>miVariable</script>";
echo $datos;
?>
</body>
Thank you in advance to everyone.
P. D. Use Windows 7 and PHP 7.