Je voudrais savoir si un robot / pirate qui est confronté à un formulaire donc les champs "name" sont crypté, pourrait t'il pourrais encore passer au travers ?
Merci
Exemple :
<?php
session_start(); #Ouverture de session
#Création dynamic des nom de champs
$_SESSION['form_nom'] = md5('nom'.date('r')); #Création du nom 'nom' crypté et ajouter de la date
$_SESSION['form_prenom'] = md5('prenom'.date('r')); #Création du nom 'prénom' crypté et ajouter de la date
$_SESSION['form_mail'] = md5('mail'.date('r')); #Création du nom 'Mail' crypté et ajouter de la date
$_SESSION['form_commentaire'] = md5('commentaire'.date('r')); #Création du nom 'commentaire' crypté et ajouter de la date
$_SESSION['form_bouton'] = md5('bouton'.date('r')); #Création du nom 'SUBMIT' crypté et ajouter de la date
#Formulaire HTML
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Language" content="fr-be" />
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-15" />
<title>Formulaire de contact.</title>
</head>
<body>
<form method="POST" action="validation.php">
<fieldset style="font-style: oblique; color: #0000FF; width: 558; height: 320; border: 1px solid #0000FF; background-color: #EFEFEF">
<legend>Formulaire</legend>
<table border="0" width="100%" id="table1">
<tbody>
<tr>
<td width="101">Nom :</td>
<td>
<input type="text" value="" name="<?php echo $_SESSION['form_nom'];?>" style="border-style: solid; border-width: 0px" /></td>
</tr>
<tr>
<td width="101">Prénom :</td>
<td>
<input type="text" value="" name="<?php echo $_SESSION['form_prenom'];?>" style="border-style: solid; border-width: 0px" /></td>
</tr>
<tr>
<td width="101">E Mail :</td>
<td>
<input type="text" value="" name="<?php echo $_SESSION['form_mail'];?>" style="border-style: solid; border-width: 0px" /></td>
</tr>
<tr>
<td width="101" valign="top">Commentaire :</td>
<td><textarea rows="8" name="<?php echo $_SESSION['form_commentaire'];?>" cols="39" style="border-style: solid; border-width: 0px" ></textarea></td>
</tr>
</tbody>
</table>
<p align="center"><input type="submit" value="Envoyer" name="<?php echo $_SESSION['form_bouton'];?>" /></p>
<p> </p>
</fieldset></form>
</body>
</html>
Parce que je part de la logique (peut-être fausse ?) qu'il doit pouvoir lire les champs pour les remplirMerci