Bonjour à tous
Voilà, j'ai créé un formulaire mail avec des champs à remplir dont code ci-dessous :
<?
$variables = array("gateau1","nom","prenom","email","sujet","texte");
foreach($_REQUEST as $key => $val) if (in_array($key, $variables)) ${$key} = $val;
require("config.esm.php");
$droits = 0;
$vrainom = "";
$vraiprenom = "";
$adresse = "";
if (! isset($sujet)) $sujet = "";
$onloadscript = "";
$affichage = true;
if (isset($texte)) {
#On revient d'un submit
$texte = AntiTag(stripslashes($texte));
$sujet = AntiTag(stripslashes($sujet));
@ mail("$URL_WEBMESTRE", "Message de $prenom $nom.", "Sujet : $sujetnn$texte", "From: $email") or DieInfo("Envoie du mail impossible", __FILE__, __LINE__);
$onloadscript = "alert('Votre message a été transmis'); location.replace('sommaire.php');";
$affichage = false;
} else{
if (isset($gateau1)) CheckDroits($gateau1);
$dummy = "";
$onloadscript = 'document.form2.sujet.focus();';
if ($droits > 0) $dummy = "DISABLED"; else $onloadscript = 'document.form2.nom.focus();';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="fr-fr">
<head>
<SCRIPT language="JavaScript">
<!--
function Majuscule(textbox) {
textbox.value = textbox.value.toUpperCase();
}
function Initiale(textbox) {
chaine = "";
carac = "";
flag = true;
for (i = 0; i < textbox.value.length; i++) {
carac = textbox.value.substr(i, 1);
if (flag) {
chaine = chaine + carac.toUpperCase();
flag = false;
} else {
chaine = chaine + carac;
}
if (carac == "-" || carac == " ") flag = true;
}
textbox.value = chaine;
}
function SubmitForm()
if (document.form2.sujet.value.length < 2) {
alert('Veuillez S.V.P. remplir le maximum de cases.');
document.form1.sujet.focus();
return false;
}
-->
</SCRIPT>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Formulaire généalogique</title>
<meta content="" name="author">
</head>
<body style="direction: ltr; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); background-image: url(file:///C:/Documents%20and%20Settings/Propri%E9taire/Bureau/fonds%20de%20page/marbre.gif);" alink="#000088" link="#0000ff" vlink="#ff0000">
<?
echo "<BODY BGCOLOR='yellow' onload="javascript:$onloadscript">n";
if ($affichage) {
echo "<FORM NAME='form2' ID='form2' ACTION='email.php' METHOD='POST' onsubmit='return SubmitForm();'>n"
<div style="text-align: center;"><big><span style="font-weight: bold; text-decoration: underline;">FORMULAIRE
GENEALOGIQUE</span></big><br>//formulaire généalogique
</div>
<br>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(51, 204, 0); text-decoration: underline;">1ère
génération</span><br>//1ère géneration
<br>
</div>
<div style="text-align: center;"><span style="color: rgb(51, 51, 255);"> <span style="font-weight: bold;">VOUS</span></span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value=""> //nom
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value=""> //prénom
<small><br>
NAISSANCE (jj/mm/aaaa) </small>//date de naissance
<input maxlength="8" size="8" name="Naissance" value="">
LIEU <small>(Ville/Code postal)</small> //lieu de naissance
<input maxlength="50" size="50" name="LIEU" value=""></div>
<br>
<div style="text-align: center;"><span style="text-decoration: underline; font-weight: bold; color: rgb(51, 204, 0);">2ème
génération</span><br>//2ème génération
</div>
<div style="text-align: center;"><span style="color: rgb(51, 51, 255); font-weight: bold;"><br>
VOTRE PERE</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value=""></div>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(255, 102, 0);"> VOTRE
MERE</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<br>
<br>
</div>
<br>
<div style="text-align: center;"><span style="text-decoration: underline; font-weight: bold; color: rgb(51, 204, 0);">3ème
génération</span><br>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(51, 51, 255);"><br>
VOTRE GRAND-PERE PATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<br>
<br>
</div>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(51, 51, 255);"> VOTRE
GRAND-MERE PATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<br>
<br>
</div>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(255, 102, 0);"> VOTRE
GRAND-PERE MATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value=""><br>
<br>
</div>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(255, 102, 0);"> VOTRE
GRAND-MERE MATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<br>
<br>
</div>
<br>
<div style="text-align: center;"><span style="text-decoration: underline; font-weight: bold; color: rgb(51, 204, 0);">4ème
génération</span><br>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(51, 51, 255);"><br>
LE PERE DE VOTRE GRAND-PERE PATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<br>
</div>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(51, 51, 255);">LA MERE
DE VOTRE GRAND-PERE PATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value=""><br>
</div>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(51, 51, 255);">LE PERE
DE VOTRE -GRAND-MERE PATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value=""><br>
<small> </small> <br>
</div>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(51, 51, 255);">LA MERE
DE VOTRE GRAND-MERE PATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value=""><span style="font-weight: bold; color: rgb(51, 51, 255);"><br>
<span style="color: rgb(255, 102, 0);"><br>
</span></span><span style="font-weight: bold; color: rgb(51, 51, 255);"><span style="color: rgb(255, 102, 0);">LE PERE DE VOTRE</span>
</span><span style="font-weight: bold; color: rgb(51, 51, 255);"><span style="color: rgb(255, 102, 0);">GRAND-PERE MATERNEL</span></span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value=""></div>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(255, 102, 0);"><br>
</span><span style="font-weight: bold; color: rgb(51, 51, 255);"><span style="color: rgb(255, 102, 0);">LA MERE DE VOTRE</span> </span><span style="font-weight: bold; color: rgb(255, 102, 0);">GRAND-PERE
MATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value=""></div>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(255, 102, 0);"><br>
LE PERE DE VOTRE GRAND-MERE MATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value=""></div>
<div style="text-align: center;"><span style="font-weight: bold; color: rgb(255, 102, 0);"><br>
</span><span style="font-weight: bold; color: rgb(51, 51, 255);"><span style="color: rgb(255, 102, 0);">LA MERE DE VOTRE</span> </span><span style="font-weight: bold; color: rgb(255, 102, 0);">GRAND-MERE
MATERNEL</span><br>
<small>NOM</small> <input maxlength="25" size="25" name="Nom" value="">
<small>PRENOM</small> <input maxlength="25" size="25" name="Prénom" value="">
<br>
<small>NAISSANCE (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Naissance" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value="">
<small><br>
DECES (jj/mm/aaaa) </small>
<input maxlength="8" size="8" name="Décès" value=""> LIEU
<small>(Ville/Code postal)</small>
<input maxlength="50" size="50" name="LIEU" value=""></div>
</div>
</div>
</form>";
?>
</body>
</html>
Lorsque je rentre les coordonnées dans les champs et que je veux envoyer le formulaire par mail, je reçois bien le mail mais il est vide de tous renseignements.
Qu'est-ce que j'ai oublié ou mal renseigné ?
Merci pour vos réponses
Afficher la suite