correction-ulysse #2
@@ -1,13 +1,10 @@
|
||||
<?php
|
||||
|
||||
$table = filter_input(INPUT_GET, 'table', FILTER_VALIDATE_INT);
|
||||
$tableSaisie = filter_input(INPUT_GET, 'table', FILTER_UNSAFE_RAW);
|
||||
$tableSaisie = is_string($tableSaisie) ? trim($tableSaisie) : '';
|
||||
|
||||
$lignes = [];
|
||||
$messageErreur = '';
|
||||
|
||||
if ($tableSaisie !== '') {
|
||||
if ($table === false || $table === null) {
|
||||
$messageErreur = 'Veuillez saisir un entier valide.';
|
||||
} else {
|
||||
@@ -18,4 +15,4 @@ if ($tableSaisie !== '') {
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ include_once 'include/controller.php';
|
||||
type="number"
|
||||
name="table"
|
||||
placeholder="table"
|
||||
value="<?php echo htmlspecialchars($tableSaisie, ENT_QUOTES, 'UTF-8'); ?>"
|
||||
value="<?php echo htmlspecialchars($table, ENT_QUOTES, 'UTF-8'); ?>"
|
||||
>
|
||||
<button type="submit">ENVOYER</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user