I'm developing a system to evaluate a user (typical of stars), but I'm having problems passing values to PHP.
Javascript code:
function mouseClick(id){
var valorVoto = document.getElementById(id).value
valorVoto = valorVoto.split("#")
voto = valorVoto[4]
<?php $voto = "<script>document.write(voto)</script>"; ?>
}
PHP code:
if(isset($voto)){
echo 'Passou';
}
When I open the page it does not wait for the button to click, it just echoes it.