コード例 #1
0
    //Add More choices
    $limit = 5;
    while ($limit > 0) {
        $hidden = "candidateID" . $count++;
        $candidate_id = $newCount--;
        echo "<tr><td width = 25px></td><td>";
        echo "Choice {$choiceCount}: <input type ='text' name='{$candidate_id}'";
        echo "></td></tr>";
        echo "<input type=hidden name = {$hidden} METHOD='POST' value='{$candidate_id}_{$ballotItemID}_{$choiceCount}_{$unique}'>";
        $choiceCount++;
        $limit--;
    }
    echo "</table>";
    $ballotItemLimit--;
}
//machines and reg voters
echo "<table><tr><td>";
echo createMachineCountColumn($election_id);
echo "</td><td>";
echo createRegVotersColumn($election_id);
echo "</td></tr></table>";
echo "<input type='hidden' name='election' value='{$election_id}'>";
echo "<input type=hidden name = 'maxCount' value='{$count}'>";
echo "<input type=hidden name = 'maxCategoryCount' value='{$categoryCount}'>";
?>
<input type='submit' value='Save'>
</form>

 </body>
</html>
コード例 #2
0
ファイル: add.php プロジェクト: anoukstein/ptonElections
            $limit = 10;
            while ($limit > 0) {
                $hidden = "candidateID" . $count++;
                $candidate_id = $newCount--;
                echo "<tr><td width = 25px></td><td>";
                echo "Choice {$choiceCount}: <input type ='text' name='{$candidate_id}'";
                echo "></td></tr>";
                echo "<input type=hidden name = {$hidden} METHOD='POST' value='{$candidate_id}_{$ballotItemID}_{$choiceCount}_{$unique}'>";
                $choiceCount++;
                $limit--;
            }
            echo "</table>";
            $ballotItemLimit--;
        }
        //machines and reg voters
        echo "<table><tr><td>";
        echo createMachineCountColumn($priorElection_id);
        echo "</td><td>";
        echo createRegVotersColumn($priorElection_id);
        echo "</td></tr></table>";
        echo "<input type=hidden name='election' value='{$election_id}'>";
        echo "<input type=hidden name = 'maxCount' value='{$count}'>";
        echo "<input type=hidden name = 'maxCategoryCount' value='{$categoryCount}'>";
        echo "<input type='submit' value='Save'>";
    }
}
?>
 </form>
 </body>
</html>