I’m passing variables to a php script and js but the thing is I’m using the post method. I dont want it to return the php script in the browser. Here’s the snippet:
<form method="POST" action="./scripts/poll_vote.php">
Yes:
<input type="radio" name="vote"
value="0" >
<br />No:
<input type="radio" name="vote"
value="1" >
<?php
$entry_id = "{entry_id}";
echo "<input type='hidden' name='entry' value='$entry_id'>";
echo "<input type='hidden' name='test' value='$message'>";
echo "<input type='submit' Value='Submit' onclick='getVote(vote.value)'>" ;
?>
</form>
Is there a way to pass the variable and not go to the page? I hate to pass the entry_id via js.