Thank you, James!!!!! Yes, that worked......... For anyone else, make sure to change the last line of function sendVote(), instead of "alert(radio.value);", to "getVote(radio.value);". Coincidentally, the PHP part of my poll (poll_vote.php) was also bad, because I had altered it to accommodate for more than two options. Then I thought, "Wow, does that mean this would've worked without the extra functions (as above)?". But no, I tried different variations of using "getVote()" directly, and it didn't work, so apparently the above functions were necessary. For anyone wondering, here's the code for poll_vote.php to accommodate multiple options:
<?php$vote = $_REQUEST['vote'];//get content of textfile$filename = "poll_result.txt";$content = file($filename);//put content in array$array = explode("||", $content[0]);//count vote$array[$vote]++;//insert votes to txt file$insertvote = $array[0]."||".$array[1]."||".$array[2]."||".$array[3];$fp = fopen($filename,"w");fputs($fp,$insertvote);fclose($fp);static $total=0;foreach($array as $value){$total = $value + $total;}?><table style="width: 100%; height: 250px;"><tr><td>Option 1</td><td><?php echo(100*round($array[0]/$total,2)); ?>%</td></tr><tr><td>Option 2</td><td><?php echo(100*round($array[1]/$total,2)); ?>%</td></tr><tr><td>Option 3</td><td><?php echo(100*round($array[2]/$total,2)); ?>%</td></tr><tr><td>Option 4</td><td><?php echo(100*round($array[3]/$total,2)); ?>%</td></tr></table><p style="color:#d90909; font-size: 9pt; font-family:'lucida grande',tahoma,sans-serif;"><i>*after vote message*</i></p>