J'ai donc crée un formulaire avec dreamweaver CS3 dont voici le code :
Code : Tout sélectionner
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Union Cycliste du Pays de Morlaix</title>
<!-- InstanceEndEditable -->
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.Style1 {
font-size: xx-large;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #0000FF;
}
-->
</style>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<!-- InstanceBeginEditable name="head" -->
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.Style5 {
font-family: "Courier New", Courier, monospace;
font-weight: bold;
font-size: x-large;
}
.Style6 {font-size: xx-large}
.Style7 {
font-size: xx-large;
font-family: "Courier New", Courier, monospace;
font-weight: bold;
}
.Style8 {font-size: x-large}
-->
</style>
<link href="SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.Style12 {
font-size: large;
font-family: "Times New Roman", Times, serif;
}
-->
</style>
<script type="text/javascript">
<!--
function MM_popupMsg(msg) { //v1.0
alert(msg);
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
<!-- InstanceEndEditable -->
</head>
<body>
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">Convocation</li>
<li class="TabbedPanelsTab" tabindex="0">VTT</li>
<li class="TabbedPanelsTab" tabindex="0">Route</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">
<p><strong>Assemblé générale</strong></p>
<p>Samedi 18 octobre a 18h00</p>
<p>(Ancien lycée de Kernegues)</p>
</div>
<div class="TabbedPanelsContent">
<p>14h Pont Noir </p>
<p>Samedi 18 Octobre </p>
</div>
<div class="TabbedPanelsContent">Non défini</div>
</div>
</div>
<!-- InstanceBeginEditable name="txtmenu" -->
<div id="container">
<div id="header">
<ul>
<li><a href="http://ucpm.fr/">acceuil</a></li>
<li><a href="http://www.ucpm.fr/infos">Infos</a></li>
<li><a href="http://www.ucpm.fr/activites">activites</a></p></li>
<li><a href="http://www.ucpm.fr/photos">photos</a></li>
<li><a href="http://www.ucpm.fr/even">evenements</a></li>
<li><a href="http://www.ucpm.fr/res">Resultats</a></li>
<li><a href="http://www.ucpm.fr/cont" class="home">contact</a></li>
</ul>
</div>
<div id="letter">
<h2><br class="spacer" />
</h2>
</div>
<div align="center">
<p class="Style1">Bienvenue sur le site de l'UCPM</p>
<p class="Style1"> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<form action="cont.php" method="post" name="form1">
<p class="Style5 Style6">Infos</p>
<p> </p>
<p><span id="sprytextfield2">
<label><span class="Style5">Nom</span>
<input name="nom" type="text" id="nom" value="Nom" size="30" maxlength="20" />
</label>
<span class="textfieldRequiredMsg"><strong>Une valeur est requise.</strong></span></span></p>
<div align="left"></div>
<p> </p>
<p><span id="sprytextfield3">
<label><span class="Style5">Prenom</span>
<input name="prenom" type="text" id="prenom" value="Prenom" size="30" maxlength="20" />
</label>
<span class="textfieldRequiredMsg"><strong>Une valeur est requise.</strong></span></span></p>
<p> </p>
<span id="sprytextfield1">
<label><span class="Style5">Email</span>
<input name="email" type="text" id="email" value="[email protected]" size="30" maxlength="30" />
</label>
<span class="textfieldRequiredMsg">Une valeur est requise.</span><span class="textfieldInvalidFormatMsg"><strong>Format non valide.</strong></span></span>
<p> </p>
<p class="Style7">Message</p>
<p class="Style7"><span id="sprytextfield4">
<span class="Style8">
<label>Sujet</label>
</span>
<label>
<input name="sujet" type="text" id="sujet" value="Le sujet de votre Email ici." size="80" maxlength="80" />
</label>
</span></p>
<p class="Style7"><span id="sprytextarea1">
<span class="Style8">
<label>Texte</label>
</span>
<label>
<textarea name="txt" id="txt" cols="77" rows="5">Votre texte ici.
</textarea>
<br />
<span class="textareaRequiredMsg Style12">Une valeur est requise.</span> <span class="textfieldInvalidFormatMsg">Une valeur est requise.</span> </label>
<span class="textfieldRequiredMsg">Une valeur est requise.</span></span></p>
<p class="Style7"> </p>
<p class="Style7">
<label>
<input type="reset" name="reini" id="reini" value="Réinitialiser" />
<input name="submit" type="submit" id="submit" onclick="MM_popupMsg('Votre Email a bien été envoyé.');MM_goToURL('parent','index.html');return document.MM_returnValue" value="Envoyer" />
</label>
</p>
</form>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><br class="spacer" />
</p>
</div>
</div>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="menubas" -->
<div id="footerOutside">
<div id="footer">
<ul class="nav">
<li><a href="#">acceuil</a>|</li>
<li><a href="#">infos</a>|</li>
<li><a href="#">activites</a>|</li>
<li><a href="#">photos</a>|</li>
<li><a href="#">evenements</a>|</li>
<li><a href="#">resultats</a>|</li>
<li><a href="#">contact</a></li>
</ul>
<br class="spacer" />
<p> </p>
<br class="spacer" />
</div>
</div>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "email", {validateOn:["blur", "change"]});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["blur", "change"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur", "change"]});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {isRequired:false, validateOn:["blur", "change"]});
var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {validateOn:["blur", "change"]});
//-->
</script>
<!-- InstanceEndEditable -->
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
</body>
<!-- InstanceEnd --></html>
Code : Tout sélectionner
<?php
$msg = $_POST["nom"]."\n";
$msg .= $_POST["prenom"]."\n";
$msg .= $_POST["email"]."\n";
$msg .= $_POST["sujet"]."\n";
$msg .= $_POST["txt"]."\n";
$mymail = "[email protected]";
mail($mymail, "Resultat formulaire", $msg)
?>
Mais pas moyen de faire marcher les deux en même temps.
Je ne m'y connais pas beaucoup en php.Donc merci beaucoup d'avance pour votre aide