Simple form poll.
<form method="post" action="results.php">
Vote here <input type="radio" name="vote" value="B Smith">
Vote here <input type="radio" name="vote" value="J Meyers">
Vote here <input type="radio" name="vote" value="P Jones">
(results.php)
$votex = $HTTP_POST_VARS['vote'];
Am trying to get the $votex variable to grab the name of the one voted for.
The mysql portion is working fine using vote, but have been unable to take the vote text from the form and make a new variable/decision out of it.
if (!empty($vote)) // if
{
$vote = addslashes($vote);
$query = "update poll_results
set num_votes = num_votes + 1
where candidate = '$vote'";
Running PHP 4.0.3 on BSD 4.2. Been staring at this thing for 5 hours now....