Bonjour tout le monde
Voila je suis entrain de refaire mon formulaire de devis de mon site pour l’incorporé a pragmamx
Mon formulaire marche très bien
Donc pour le mettre dans pragmamx j’ai crée un module devis
<?php
defined('mxMainFileLoaded') or die('access denied');
//$module_name = basename(dirname(__file__));
$index = 1; // 0 pour ne pas afficher les bloc de droite et 1 pour afficher
include('header.php');
OpenTable();
?>
LE CONTENUE DE MON FORMULAIRE
<?php
CloseTable();
include('footer.php');
?>
Et quand je mes le contenue de mon formulaire ca ne marche pas (mon contenue)
Il me mes des erreurs quelqu’un a une idée ?

<?php
// Couleur du texte des champs si erreur saisie utilisateur
$color_font_warn="#000000";
// Couleur de fond des champs si erreur saisie utilisateur
$color_form_warn="#c9fcf9";
// Ne rien modifier ci-dessous si vous n’êtes pas certain de ce que vous faites !
$list['f_1']=array("Cartes de visites","Logo","Bannière","Web design","Autre");
$list['f_2']=array("Logo","Charte graphique");
$list['f_6']=array("Particulier","Société","Association");
if(isset($_POST['submit'])){
$erreur="";
// Nettoyage des entrées
while(list($var,$val)=each($_POST)){
if(!is_array($val)){
$$var=strip_tags($val);
}else{
while(list($arvar,$arval)=each($val)){
$$var[$arvar]=strip_tags($arval);
}
}
}
// Formatage des entrées
$f_3=strip_tags(trim($f_3));
$f_4=trim(ucwords(eregi_replace("[^a-zA-Z0-9éèàäö\ -]", "", $f_4)));
$f_7=trim(ucwords(eregi_replace("[^a-zA-Z0-9éèàäö\ -]", "", $f_7)));
$f_8=trim(ucwords(eregi_replace("[^a-zA-Z0-9éèàäö\ -]", "", $f_8)));
$f_9=strip_tags(trim($f_9));
// Verification des champs
if(!$f_1){
$erreur.="<li><span class='txterror'>Le champ « Elements demandés » requiert au moins une sélection.</span>";
$errf_1=1;
}
if(strlen($f_3)<2){
$erreur.="<li><span class='txterror'>Le champ « Adresse du site » est vide ou incomplet.</span>";
$errf_3=1;
}else{
if(!ereg('^http(s)?://[-[:alnum:]]+\.[-[:alnum:]]+\.[a-zA-Z]{2,4}(:[0-9]+)?', $f_3)){
$erreur.="<li><span class='txterror'>La syntaxe de votre URL n'est pas correcte.</span>";
$errf_3=1;
}
}
if(strlen($f_4)<2){
$erreur.="<li><span class='txterror'>Le champ « Votre budget » est vide ou incomplet.</span>";
$errf_4=1;
}
if(strlen($f_5)<2){
$erreur.="<li><span class='txterror'>Le champ « Descriptif » est vide ou incomplet.</span>";
$errf_5=1;
}
if(!$f_6){
$erreur.="<li><span class='txterror'>Le champ « Statut » requiert au moins une sélection.</span>";
$errf_6=1;
}
if(strlen($f_7)<2){
$erreur.="<li><span class='txterror'>Le champ « Votre prénom et nom » est vide ou incomplet.</span>";
$errf_7=1;
}
if(strlen($f_9)<2){
$erreur.="<li><span class='txterror'>Le champ « Votre email » est vide ou incomplet.</span>";
$errf_9=1;
}else{
if(!ereg('^[-!#$%&\'*+\./0-9=?A-Z^_`a-z{|}~]+'.
'@'.
'[-!#$%&\'*+\/0-9=?A-Z^_`a-z{|}~]+\.'.
'[-!#$%&\'*+\./0-9=?A-Z^_`a-z{|}~]+$',
$f_9)){
$erreur.="<li><span class='txterror'>La syntaxe de votre adresse e-mail n'est pas correcte.</span>";
$errf_9=1;
}
}
if($erreur==""){
// Création du message
$titre="Message de votre site";
$tete="From:Site@Synchronizer-design.com\n";
for($id=0; $id<count($list['f_1']); $id++){
if($f_1[$id]==1){
$corps.="Elements demandés : ".$list['f_1'][$id]."\n";
}
}
for($id=0; $id<count($list['f_2']); $id++){
if($f_2[$id]==1){
$corps.="Elements existants : ".$list['f_2'][$id]."\n";
}
}
$corps.="Adresse du site : ".$f_3."\n";
$corps.="Votre budget : ".$f_4."\n";
$corps.="Descriptif : ".$f_5."\n";
for($id=0; $id<count($list['f_6']); $id++){
if($f_6[$id]==1){
$corps.="Statut : ".$list['f_6'][$id]."\n";
}
}
$corps.="Votre prénom et nom : ".$f_7."\n";
$corps.="Votre Société ou association : ".$f_8."\n";
$corps.="Votre email : ".$f_9."\n";
if(mail("synchro@synchronizer-design.com", $titre, stripslashes($corps), $tete)){
$ok_mail="true";
}else{
$erreur.="<li><span class='txterror'>Une erreur est survenue lors de l'envoi du message, veuillez refaire une tentative.</span>";
}
}
}
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#fond {
background-image: url(design/fondpage.jpg);
background-repeat: no-repeat;
background-position: right bottom;
}
.Style1 {
color: #0099CC;
font-weight: bold;
}
.Style3 {color: #93bcc9}
.Style4 {color: #F0F0F0}
.button {
cursor: pointer;
width: 83px;
height: 25px;
border: none;
background: url("http://www.synchronizer-design.com/design/envoyer.png") no-repeat left top;
}
.button:hover {
background: url("http://www.synchronizer-design.com/design/envoyer2.png") no-repeat left bottom;
}
.inp {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #4e4e4e;
background-color: #252424;
border: 0px;
width:13px;
height:13px;
}
#inp {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #4e4e4e;
background-color: #252424;
border: 0px;
width:200px;
}
#inppp {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #4e4e4e;
background-color: #252424;
border: 0px;
width:100px;
}
#inpp {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #4e4e4e;
background-color: #252424;
border: 0px;
width:300px;
height:110px;
}
-->
</style></head>
<body>
<div id="fond">
<? if($ok_mail=="true"){ ?>
<table width='100%' border='0' cellspacing='1' cellpadding='1'>
<tr><td align="left"><span class='txtform'>Le message ci-dessous nous a bien été transmis, et nous vous en remercions.</span></td></tr>
<tr><td> </td></tr>
<tr><td><tt><?echo nl2br(stripslashes($corps));?></tt></td></tr>
<tr><td> </td></tr>
<tr><td align="left"><span class='txtform'>Nous allons y donner suite dans les meilleurs délais.<br>A bientôt.</span></td></tr>
</table>
<? }else{ ?>
<form action='<? echo $PHP_SELF ?>' method='post' name='Form'>
<table width='100%' border='0' cellspacing='1' cellpadding='1'>
<? if($erreur){ ?><tr><td colspan='2' bgcolor='#c9fcf9'><span class='txterror'><font color='#000000'><b> ERREUR, votre message n'a pas été transmis</b></font></span></td></tr><tr><td colspan='2'><ul><?echo$erreur?></ul></td></tr><?}?>
<tr><td align="left" colspan='2'><span class='txterror'><strong>Synchronizer-Design</strong> vous propose de rentrer en contact avec ses graphistes pour leur soumettre des demandes de devis pour la réalisation d'interfaces web personnalisées, ou toutes autres créations graphiques.<br />
Remplissez le formulaire ci-dessous en détaillant précisément votre demande.<br /><br />Les champs marqué d'un * sont obligatoires<br /><br />Les graphistes qui seront intéressés par le projet demandé vous répondront sous quelques jours.<br />
<span class="Style1">Les demandes incomplètes ou inintéressantes ne seront pas soumises à nos graphistes<br /></span>.</td>
</tr>
<tr><td valign="top" align='right' width='30%'><span class='txtform'>Elements demandés* :</span></td><td>
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_1']);$id++){
if($f_1[$id]==1){$ct="checked";}
print("<tr><td><input ".$ct." type='checkbox' class='inp' name='f_1[$id]' value='1' border='0'></td><td><span class=''>".$list[f_1][$id]."</span></td></tr>");
unset($ct);
}?>
</table>
<br /><br />
</td></tr>
<tr><td valign="top" align='right' width='30%'><span class='txtform'>Elements existants :</span></td><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="Style3">Si le travail demandé doit se baser sur des éléments existants, merci d'indiquer ce qui existe déjà :</span></td>
</tr>
</table>
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_2']);$id++){
if($f_2[$id]==1){$ct="checked";}
print("<tr><td><input ".$ct." type='checkbox' class='inp' name='f_2[$id]' value='1' border='0'></td><td><span class='txtform'>".$list[f_2][$id]."</span></td></tr>");
unset($ct);
}?>
</table>
<br /><br />
</td></tr>
<tr><td valign="top" align='right' width='30%'><span class='txtform'>Adresse du site* :</span></td><td align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="Style3">S'il s'agit d'une refonte de site, merci d'indiquer son adresse :</span></td>
</tr>
</table><input id="inp" type='text' style='width:200 <?if($errf_3==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_3' value='<?if($submit){echo stripslashes($f_3);}else{print("http://");}?>' size='24' border='0'><br /><br /></td></tr>
<tr><td valign="top" align='right' width='30%'><span class='txtform'>Votre budget* :</span></td><td align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="Style3">Pour un projet sérieux, comptez au moins 2 à 3 journées de travail (soit 50 €uros minimum).</span></td>
</tr>
</table><input id="inppp" type='text' style='width:200 <?if($errf_4==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_4' value='<?echo stripslashes($f_4);?>' size='24' border='0'>
<span class="Style3">€</span><br /><br /></td>
</tr>
<tr><td valign="top" align='right' width='30%'><span class='txtform'>Descriptif* :</span></td><td align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="Style3">Présentez vous et décrivez ci-dessous votre projet le plus précisément possible :</span></td>
</tr>
</table><textarea id="inpp" style='width:360 <?if($errf_5==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_5' rows='6' cols='40'><?echo$f_5?></textarea><br /><br /></td></tr>
<tr><td valign="top" align='right' width='30%'><span class='txtform'>Statut* :</span></td><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="Style3">Merci d'indiquer si vous êtes :</span></td>
</tr>
</table>
<table border='0' cellspacing='0' cellpadding='0'>
<? for($id=0;$id<count($list['f_6']);$id++){
if($f_6[$id]==1){$ct="checked";}
print("<tr><td><input ".$ct." type='checkbox' class='inp' name='f_6[$id]' value='1' border='0'></td><td><span class='txtform'>".$list[f_6][$id]."</span></td></tr>");
unset($ct);
}?>
</table>
<br />
</td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Votre prénom et nom* :</span></td><td align="left"><input id="inp" type='text' style='width:200 <?if($errf_7==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_7' value='<?echo stripslashes($f_7);?>' size='24' border='0'></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Votre Société ou association :</span></td><td align="left"><input id="inp" type='text' style='width:200 <?if($errf_8==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_8' value='<?echo stripslashes($f_8);?>' size='24' border='0'></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Votre email* :</span></td><td align="left"><input id="inp" type='text' style='width:200 <?if($errf_9==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_9' value='<?echo stripslashes($f_9);?>' size='24' border='0'></td></tr>
<tr><td align='right' width='30%'></td><td align="left"><br /><input type='submit' name='submit' value='' border='0' class="button"></td></tr>
</table>
</form>
<? } ?>
</div>
</body>
</html>