Currently working with Bitrix CMS and need to make vote for users from specific group. With knowing id of group i made a form with bunch of radio buttons inside. When someone vote, result shoud be writen in file (or database) and page with "Thank you for voting!" should be displayed.
My question is **what is the best way to do it?**
I tried a few different ways:  

1) [this tutorial](http://code.tutsplus.com/tutorials/creating-a-dynamic-poll-with-jquery-and-php--net-57), not working  

2) two another web tutorials, can link if you ask me  

3) Voting form from bitrix, but for that module of the system should be change, and that not advised.

Below is page with vote itself, but "poll.php" makes me confused because of not knowing right way to do it. So good advice would be really appreciated.

p.s. you can ignore 'Bitrix' part, most important is php

```html
/*get users from group in array*/
<?$arUsers = CGroup::GetGroupUser(20);
$iCountUsers = 0;
$arUsersbyGroupID = array();
foreach($arUsers as $arUser) {
 $arUserbyID = CUser::GetByID($arUser);
 $rsUserbyID = $arUserbyID -> Fetch();
 $arUsersbyGroupID[] = $rsUserbyID; }
 $iCountUsers++;?>

<div class="wrapper">
      <div id="poll-container">
       <form class="grid" action="poll.php" method="post" accept-charset="utf-8">
         /*for each create element with radio button*/
  <?$iVoteCount = 0;
  $allopt = array();
  foreach($arUsersbyGroupID as $Vote) {
  $photo = $Vote["PERSONAL_PHOTO"];
   if (!empty($photo)) {
   $name = "{$Vote["NAME"]} {$Vote["LAST_NAME"]}";?>
        <div class="cell">
   <div class="cell_img"><?echo CFile::ShowImage($photo)?></div>
            <div class="cell_caption">
                    <input type="radio" value="<?=$iVoteCount?>" name="vote" onclick="getVote(this.value)" />
                    <label for='opt<?=$iVoteCount?>'><?echo $name?></label>
            </div>
        </div>
  $iVoteCount++;
}
  } ?>
        <div id="sub"><input type="submit" value="Vote" /></div>
    </form>
 </div>
 </div>
```