1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
PHP_TP_Note/views/v_poll.php

29 lines
861 B
PHP
Raw Normal View History

2020-11-13 09:18:41 +01:00
<?php
// En tête de page
?>
<?php require_once(PATH_VIEWS.'header.php');?>
<!-- Zone message d'alerte -->
<?php require_once(PATH_VIEWS.'alert.php');?>
<!-- Début de la page -->
<?php if (isset($poll) and $poll and isset($answers) and $answers) { ?>
<h2><?= $poll["question"] ?></h2>
<?php foreach ($answers as $answer) { ?>
<p><?= $answer["texte"] ?>: <?= str_repeat("+", $answer["nbChoisi"]) ?></p>
<?php } ?>
<form method="POST">
<?php foreach ($answers as $answer) { ?>
<label>
<input type="radio" name="answer" value=<?= $answer["repId"] ?>>
<?= $answer["texte"] ?>
</label>
<?php } ?>
<input type="submit" value=<?= ANSWER ?>>
</form>
<?php } ?>
<!-- Fin de la page -->
<!-- Pied de page -->
<?php require_once(PATH_VIEWS.'footer.php');