Avez-vous une idée de ce que j'aurais pu oublier, mal programmer?
Merci d'avance de vos réponses.
<?php
if (isset($_POST['func'], $_POST['value']) && is_string($_POST['func']) && is_string($_POST['value']))
{
$value = htmlentities($_POST['value']);
$func = htmlentities($_POST['func']);
echo $func($value);
}
else
{
echo '<h2>Hash MD5 / SHA1 / Crypt</h2>
<form method="post" action="index.php">
Input: <input type="text" name="value" />
<input type="submit" name="func" value="md5" />
<input type="submit" name="func" value="sha1" />
<input type="submit" name="func" value="crypt" />
</form>';
}
?>

