<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.haisoft.fr/index.php?action=history&amp;feed=atom&amp;title=S%C3%A9curisation_de_formulaire</id>
	<title>Sécurisation de formulaire - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.haisoft.fr/index.php?action=history&amp;feed=atom&amp;title=S%C3%A9curisation_de_formulaire"/>
	<link rel="alternate" type="text/html" href="https://wiki.haisoft.fr/index.php?title=S%C3%A9curisation_de_formulaire&amp;action=history"/>
	<updated>2026-10-17T00:42:14Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.haisoft.fr/index.php?title=S%C3%A9curisation_de_formulaire&amp;diff=406&amp;oldid=prev</id>
		<title>Root xo1zfe7e le 5 juillet 2022 à 13:52</title>
		<link rel="alternate" type="text/html" href="https://wiki.haisoft.fr/index.php?title=S%C3%A9curisation_de_formulaire&amp;diff=406&amp;oldid=prev"/>
		<updated>2022-07-05T13:52:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 5 juillet 2022 à 13:52&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot;&gt;Ligne 39 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 39 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		echo &amp;quot;\n&amp;lt;br /&amp;gt;  &amp;lt;b&amp;gt;Anti-Spam&amp;lt;/b&amp;gt; : Vous n&amp;#039;avez pas coché la case !&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		echo &amp;quot;\n&amp;lt;br /&amp;gt;  &amp;lt;b&amp;gt;Anti-Spam&amp;lt;/b&amp;gt; : Vous n&amp;#039;avez pas coché la case !&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		// Si la case n&amp;#039;est pas cochée alors on affiche un message d&amp;#039;erreur.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		// Si la case n&amp;#039;est pas cochée alors on affiche un message d&amp;#039;erreur.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		// ICI VOTRE CODE pour ré-afficher le formulaire (soit en appelant le fichier concerné, soit en restant sur cette même page, en fonction de votre cas)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		// ICI VOTRE CODE pour ré-afficher le formulaire (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;facultatif, &lt;/ins&gt;soit en appelant le fichier concerné, soit en restant sur cette même page, en fonction de votre cas)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	else {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	else {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		// Si la case est cochée, alors on peut continuer vers la suite de l&amp;#039;exécution de formulaire :&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		// Si la case est cochée, alors on peut continuer vers la suite de l&amp;#039;exécution de formulaire :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		// ICI VOTRE CODE (pour vérifier les champs du formulaire -et afficher un message d&#039;erreur si les champs ne sont pas remplis-, pour envoyer le mail... &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;etc&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		// ICI VOTRE CODE (pour vérifier les champs du formulaire -et afficher un message d&#039;erreur si les champs ne sont pas remplis-, pour envoyer le mail... &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;par exemple :&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                // EXEMPLE&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                if( $_POST &amp;amp;&amp;amp; isset($_POST[&#039;auteur&#039;]) &amp;amp;&amp;amp; isset($_POST[&#039;message&#039;]) &amp;amp;&amp;amp; isset($_POST[&#039;mail&#039;]) &amp;amp;&amp;amp; $_POST[&#039;auteur&#039;] &amp;amp;&amp;amp; $_POST[&#039;message&#039;] &amp;amp;&amp;amp; $_POST[&#039;mail&#039;] ) {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                        $auteur = $_POST[&#039;auteur&#039;];&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                        $message = $_POST[&#039;message&#039;];&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                        $mail = $_POST[&#039;mail&#039;];&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                        $secondes = $_POST[&#039;secondes&#039;];&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                        include(&quot;mailer.php&quot;);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;?&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;link href=&quot;include_mail/hide.css&quot; rel=&quot;stylesheet&quot;/&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;?php&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                else {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                        echo &quot;\n&amp;lt;br /&amp;gt;  &amp;lt;b&amp;gt;Erreur&amp;lt;/b&amp;gt; : Veillez à remplir tout les champs s&#039;il-vous-plaît.&quot;;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                //FIN EXEMPLE&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Root xo1zfe7e</name></author>
	</entry>
	<entry>
		<id>https://wiki.haisoft.fr/index.php?title=S%C3%A9curisation_de_formulaire&amp;diff=139&amp;oldid=prev</id>
		<title>Root xo1zfe7e : Page créée avec « Sécurisation de formulaire  Nous aborderons ici deux méthodes pour sécuriser un formulaire sur votre site, avec et sans captcha.  La première méthode utilise le syst... »</title>
		<link rel="alternate" type="text/html" href="https://wiki.haisoft.fr/index.php?title=S%C3%A9curisation_de_formulaire&amp;diff=139&amp;oldid=prev"/>
		<updated>2018-09-12T15:21:37Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « Sécurisation de formulaire  Nous aborderons ici deux méthodes pour sécuriser un formulaire sur votre site, avec et sans captcha.  La première méthode utilise le syst... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sécurisation de formulaire&lt;br /&gt;
&lt;br /&gt;
Nous aborderons ici deux méthodes pour sécuriser un formulaire sur votre site, avec et sans captcha.&lt;br /&gt;
&lt;br /&gt;
La première méthode utilise le système reCAPTCHA de Google (à venir) ; la seconde sera sous la forme de deux cases à cocher, l&amp;#039;une d&amp;#039;elle invisible, qui «piège» les robots.&lt;br /&gt;
&lt;br /&gt;
1) reCAPTCHA (à venir)&lt;br /&gt;
&lt;br /&gt;
2) Anti spam et anti robot sans captcha&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Ce code n&amp;#039;a pas été développé par nos soins. En voici la source : https://codes-sources.commentcamarche.net/source/42273-anti-spam-et-anti-robot-securisation-de-formulaire-sans-captcha&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
But de ce code :&lt;br /&gt;
Ce code permet de sécuriser un formulaire sans utiliser d&amp;#039;image de type captcha. Il permet d&amp;#039;empêcher les robots spammeurs de valider un formulaire.&lt;br /&gt;
En effet, un captcha peut s&amp;#039;avérer lourd, car il est parfois illisible par l&amp;#039;utilisateur, mais déchiffrable par un robot.&lt;br /&gt;
Cette méthode filtrera la majorité des robots. Celle-ci peut être contournée, mais cela demande au spammeur d&amp;#039;étudier votre site pour contourner la protection, ce qui n&amp;#039;arrive presque jamais.&lt;br /&gt;
&lt;br /&gt;
Explications du code :&lt;br /&gt;
Ce code affiche deux cases à cocher : «Je confirme que je suis un être humain, et pas un robot spammeur» et «I&amp;#039;m a Stupid Spam-Robot».&lt;br /&gt;
Lorsqu&amp;#039;un utilisateur voudra valider votre formulaire, il devra cocher la case «Je confirme que je suis un être humain, et pas un robot spammeur». L&amp;#039;autre case est invisible pour l&amp;#039;utilisateur, mais pas pour le robot.&lt;br /&gt;
Un robot cochera toutes les cases, ou aucune des cases. Il ne pourra donc pas valider le formulaire.&lt;br /&gt;
Afin que le robot ne puisse retenir les réponses à cocher ou à ne pas cocher, l&amp;#039;heure actuelle et une fonction MD5 sont intégrées dans la requête POST du formulaire.&lt;br /&gt;
&lt;br /&gt;
Code :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// Récuperation des valeurs en GET ou en POST (anti-spam)&lt;br /&gt;
$try=(isset($_GET[&amp;#039;try&amp;#039;])?$_GET[&amp;#039;try&amp;#039;]:(isset($_POST[&amp;#039;try&amp;#039;])?$_POST[&amp;#039;try&amp;#039;]:&amp;#039;&amp;#039;));&lt;br /&gt;
$nobotv=(isset($_GET[&amp;#039;nobotv&amp;#039;])?$_GET[&amp;#039;nobotv&amp;#039;]:(isset($_POST[&amp;#039;nobotv&amp;#039;])?$_POST[&amp;#039;nobotv&amp;#039;]:&amp;#039;&amp;#039;));&lt;br /&gt;
$nobotc=(isset($_GET[&amp;#039;nobotc&amp;#039;])?$_GET[&amp;#039;nobotc&amp;#039;]:(isset($_POST[&amp;#039;nobotc&amp;#039;])?$_POST[&amp;#039;nobotc&amp;#039;]:&amp;#039;&amp;#039;));&lt;br /&gt;
$nobots=(isset($_GET[&amp;#039;nobots&amp;#039;])?$_GET[&amp;#039;nobots&amp;#039;]:(isset($_POST[&amp;#039;nobots&amp;#039;])?$_POST[&amp;#039;nobots&amp;#039;]:&amp;#039;&amp;#039;));&lt;br /&gt;
&lt;br /&gt;
// Variable&lt;br /&gt;
$nobot = time().&amp;#039;_&amp;#039;.rand(50000, 60000);&lt;br /&gt;
&lt;br /&gt;
// Si le visiteur soumet le formulaire&lt;br /&gt;
if($try==&amp;#039;send&amp;#039;) {&lt;br /&gt;
	if(($nobotc!=md5($nobotv)) or ($nobotv==&amp;#039;&amp;#039;) or ($nobots!=&amp;#039;&amp;#039;)) {&lt;br /&gt;
		echo &amp;quot;\n&amp;lt;br /&amp;gt;  &amp;lt;b&amp;gt;Anti-Spam&amp;lt;/b&amp;gt; : Vous n&amp;#039;avez pas coché la case !&amp;quot;;&lt;br /&gt;
		// Si la case n&amp;#039;est pas cochée alors on affiche un message d&amp;#039;erreur.&lt;br /&gt;
		// ICI VOTRE CODE pour ré-afficher le formulaire (soit en appelant le fichier concerné, soit en restant sur cette même page, en fonction de votre cas)&lt;br /&gt;
	}&lt;br /&gt;
	else {&lt;br /&gt;
		// Si la case est cochée, alors on peut continuer vers la suite de l&amp;#039;exécution de formulaire :&lt;br /&gt;
		// ICI VOTRE CODE (pour vérifier les champs du formulaire -et afficher un message d&amp;#039;erreur si les champs ne sont pas remplis-, pour envoyer le mail... etc)&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Affichage du formulaire --&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;quot; method=&amp;quot;POST&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Lignes requises pour la vérification de robot : --&amp;gt;&lt;br /&gt;
	&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;try&amp;quot; value=&amp;quot;send&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;nobotv&amp;quot; value=&amp;quot;&amp;lt;?php echo $nobot; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- ICI VOTRE CODE pour ajouter ce que vous voulez dans votre formulaire HTML --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- On ajoute les cases à cocher en bas du formulaire : --&amp;gt;&lt;br /&gt;
	&amp;lt;h3&amp;gt;Anti-Spam :&amp;lt;/h3&amp;gt;&lt;br /&gt;
	&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;nobotc&amp;quot; value=&amp;quot;&amp;lt;?php echo md5($nobot); ?&amp;gt;&amp;quot; /&amp;gt; Je confirme que je suis un être humain, et pas un robot spammeur.&lt;br /&gt;
	&amp;lt;div style=&amp;quot;position: absolute; visibility: hidden; left: -5000; top : -5000&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;br&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;nobots&amp;quot; value=&amp;quot;&amp;lt;?php echo time(); ?&amp;gt;&amp;quot; /&amp;gt;I&amp;#039;m a Stupid Spam-Robot&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Root xo1zfe7e</name></author>
	</entry>
</feed>