Passage de paramètres d'HTML vers PHP

idoru Messages postés 5 Date d'inscription lundi 3 mai 2010 Statut Membre Dernière intervention 1 juin 2010 - 3 mai 2010 à 15:57
idoru Messages postés 5 Date d'inscription lundi 3 mai 2010 Statut Membre Dernière intervention 1 juin 2010 -
Bonjour,

voici mon cas de figure... J'ai un formulaire PHP de contact intégrant :
- 2 zones texte : champ1 (sujet du message), zone_email (email de l'expéditeur pour la réponse)
- 1 combo box nommée liste1 offrant 3 choix
- 1 zone motif de contact nommée radio ayant 3 boutons radios (offrant donc 3 choix)
- 1 zone boite à cocher nommée checkbox proposant 2 choix

J'ai besoin de renseigner ces variables lorsqu'à partir d'une iframe affichée dans une lightbox (fancybox pour ne pas la nommer), donc une page HTML j'appelle ma page de contact PHP. Non seulement j'ai besoin de renseigner ces variables mais je veux surtout que les zones citées ci-dessus soient renseignées dans mon formulaire de contact PHP.


J'ai essayé la syntaxe suivante:

Page appelante HTML:
<a href="contact2.php?$champ1=reserver&liste1=brocante&bouton1=réservation&zone_texte1=bacchus" class="Style1">Réserver</a>

mais aucune case ou champ de texte n'est renseigné dans mon formulaire PHP.
Je ne suis pas une guru en PHP, quelqu'un pourrait-il m'aider ?

Est-il possible de réaliser ce passage de paramètres et renseigner automatiquement mes zones/variables dans mon formulaire existant ?



ps: je précise que mon formulaire de contact PHP s'affiche correctement chez mon hébergeur lorsque je choisis dans mon menu le lien contact, évidemment avec les variables/rubriques vides attendant d'être renseignées par l'utilisateur.
A voir également:

4 réponses

idoru Messages postés 5 Date d'inscription lundi 3 mai 2010 Statut Membre Dernière intervention 1 juin 2010
4 mai 2010 à 09:51
personne n'a d'idée ?
0
Absinthe06 Messages postés 102 Date d'inscription vendredi 11 juillet 2008 Statut Membre Dernière intervention 7 juillet 2010 11
4 mai 2010 à 10:23
Hello,

pourrait-on avoir le code complet, pour y voir un peu plus clair ? ^^

Sinon de visu comme ça, je dirais déjà que ton lien est mal construit : encadre les valeurs de tes paramètres par des quotes (' '), pour que ta page PHP les traite comme des chaines de caractères :
<a href="contact2.php?$champ1='reserver'&liste1='brocante'&bouton1='réservation'&zone_texte1='bacchus'" class="Style1">Réserver</a> 


Ensuite, petite question : dans ta page PHP, comment tu récupères ces variables ? Tu utilises bien un $_GET['paramètre_à_récupérer'] ??? (exemple : $_GET['champ1'])
0
idoru Messages postés 5 Date d'inscription lundi 3 mai 2010 Statut Membre Dernière intervention 1 juin 2010
5 mai 2010 à 18:42
Tout d'abord, merci d'essayer de m'aider !

Concernant le code, voici celui de la page html appelante:

<!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 profile="http://gmpg.org/xfn/11">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Boutique Brocante</title>

<link rel="stylesheet" href="style2.css" type="text/css" media="screen" />

<script src="gallery_b_objdeco.js" type="text/javascript"></script>

<!--[if lt IE 8]>
<style media="screen,projection" type="text/css">
#jgal li { filter: alpha(opacity=60); }
#jgal li.active, #jgal li:hover { filter: alpha(opacity=100); }
</style>
<![endif]-->

<!--[if lt IE 6]><style media="screen,projection" type="text/css">#gallery { display: block; }</style><![endif]-->

<style type="text/css">
<!--
.Style1 {color: #CCFF00}
-->
</style>
</head>

<body>
<div class="header">
<div class="logoContainer"></div>
<div class="meni">
<div class="meniItem">
<div align="center"><a href="http://lebancmoussu.com/sendlink/form.php5" class="Style1">Recommander</a></div>
</div>
<div class="meniItem">
<div align="center"><a href="info.html" class="Style1">BIO</a></div>
</div>
<div class="meniItem"><a href="contact.php?champ1=reserver&liste1=brocante&bouton1=réservation&zone_texte1=bacchus" class="Style1">Réserver</a></div>
</div>
<!--meni-->
</div>
<!--header-->
<div class="content">

<table cellpadding="0" cellspacing="0" border="0" style="text-align:center;width:100%;margin:0 auto;">
<tr>
<td class="imagelist">
<table cellpadding="0" cellspacing="0" border="0" style="text-align:center;width:100%;margin:0 auto;font-size:38px;">
<tr>
<td class="listimg">
<span onclick="swapimg(0);"><img id="item0" src="Thumbnails/brascarosse.jpg" alt="" style="opacity:.99;" /></span> </td>
<td class="listimg">
<span onclick="swapimg(1);"><img id="item1" src="Thumbnails/cageoiseau.jpg" alt="" /></span> </td>
</tr>
<tr>
<td class="listimg">
<span onclick="swapimg(3);"><img id="item3" src="Thumbnails/chaisemontgolfier.jpg" alt="" /></span> </td>
<td class="listimg">
<span onclick="swapimg(2);"><img id="item2" src="Thumbnails/vaseceramique.jpg" alt="" /></span> </td>
</tr>



<td> </td>
</tr>
</table> </td>
<td class="art">

<div id="featurebox" class="featurebox">
<div class="featured">
<img id="featured" src="images/flash/b_objdeco/brascarosse.jpg" alt="" /> </div>
<div id="featuredescription" class="featuredescription">
<div id="featuretitle" class="featuretitle"></div>
<div id="featuresize" class="featuresize"></div>
<div id="featuremeta" class="featuremeta"></div>
</div>
</div> </td>
</tr>
</table>
</div>

</body>


</html>


et voici celui de ma page contact PHP:

<?php


$desactive = ini_get('disable_functions');
if (preg_match("/ini_set/i", "$desactive") == 0) {

ini_set("error_reporting" , "E_ALL & ~E_NOTICE");
}


if (isset($_POST['envoi'])) {



session_start();

$_SESSION['champ1'] = $_POST['champ1'];
$_SESSION['zone_email1'] = $_POST['zone_email1'];
$_SESSION['liste1'] = $_POST['liste1'];

//Evaluation du bouton 1 ...
switch($_POST['bouton1']) {
case "aaaaa":
$_SESSION['bouton1'] = "aaaaa";
break;
case "bbbb":
$_SESSION['bouton1'] = "bbbb";
break;
case "cccc":
$_SESSION['bouton1'] = "cccc";
break;
default:
$_SESSION['bouton1'] = "";
} // Fin du switch...

//Enregistrement des paramÃfÆ'Ã+â€(TM)Ãfâ€sÃ'¨tres de la case 1...
$_SESSION['case1_'][0] = "";
if (isset($_POST['case1_'][0])) {
$_SESSION['case1_'][0] = $_POST['case1_'][0];
} // Fin du if...

$_SESSION['case1_'][1] = "";
if (isset($_POST['case1_'][1])) {
$_SESSION['case1_'][1] = $_POST['case1_'][1];
} // Fin du if...

//Enregistrement des zones de texte...
$_SESSION['zone_texte1'] = $_POST['zone_texte1'];

// DÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©finir l\'icone apparaissant en cas d\'erreur...


// DÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©finir sur 0 pour afficher un petit x de couleur rouge.
// DÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©finir sur 1 pour afficher l\'image d\'une croix rouge telle que celle utilisÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©e dans l\'assistant
// Si vous utilisez l\'option 1, l\'image de la croix rouge \'icone.gif\' doit se trouver dans le rÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©pertoire \'images\',
// ce dernier devant se trouver au mÃfÆ'Ã+â€(TM)Ãfâ€sÃ'ªme niveau que votre formulaire...
$flag_icone = 0;

// On vÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©rifie si $flag_icone est dÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©fini sur 0 ou 1...
if ($flag_icone == 0) {
$icone = "<b><font size=\"3\" face=\"Arial, Verdana, Helvetica, sans-serif\" color=\"#CC0000\">x</font></b>";
} else {
$icone = "<img src=\"images/icone.gif\"";
}

// DÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©finir l'indicateur d'erreur sur zÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©ro...
$flag_erreur = 0;
// N'envoyer le formulaire que s'il n'y a pas d'erreurs...
if ($flag_erreur == 0) {

// Addresse de rÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©ception du formulaire
$email_dest = "monmail@free.fr";
$sujet = "Données en provenance du formulaire de contact";
$entetes ="MIME-Version: 1.0 \n";
$entetes .="From: lebancmoussu<form@lebancmoussu.com>\n";
$entetes .="Return-Path: lebancmoussu<form@lebancmoussu.fr>\n";
$entetes .="Reply-To: lebancmoussu<form@lebancmoussu.fr>\n";
$entetes .="Content-Type: text/html; charset=iso-8859-1 \n";
$partie_entete = "<html>\n<head>\n<title>Formulaire</title>\n<meta http-equiv=Content-Type content=text/html; charset=iso-8859-1>\n</head>\n<body bgcolor=#FFFFFF>\n";


//Partie HTML de l'e-mail...
$partie_champs_texte .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Sujet de votre message : = " . $_SESSION['champ1'] . "</font><br>\n";
$partie_zone_email .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Adresse e-mail pour la rÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©ponse : = " . $_SESSION['zone_email1'] . "</font><br>\n";
$partie_listes .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Choix : = " . $_SESSION['liste1'] . "</font><br>\n";
$partie_boutons .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">bouton radio = " . $_SESSION['bouton1'] . "</font><br>\n";
$partie_cases .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">case ÃfÆ'Ã+â€(TM)Ãfâ€sÃ' cocher</font><br>\n";
$partie_cases .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Case 1 = " . $_SESSION['case1_'][0] . "</font><br>\n";
$partie_cases .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Case 2 = " . $_SESSION['case1_'][1] . "</font><br>\n";
$partie_zone_texte .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Entrez votre message : = " . $_SESSION['zone_texte1'] . "</font><br>\n";


// Fin du message HTML
$fin = "</body></html>\n\n";

$sortie = $partie_entete . $partie_champs_texte . $partie_zone_email . $partie_listes . $partie_boutons . $partie_cases . $partie_zone_texte . $fin;


// Send the e-mail
if (@!mail($email_dest,$sujet,$sortie,$entetes)) {
echo("Envoi du formulaire impossible");
exit();
} else {

// Rediriger vers la page de remerciement
header("Location:merci.html");
exit();
} // Fin else
} // Fin du if ($flag_erreur == 0) {
} // Fin de if POST
?>
<html>
<!--
-->

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<head>
<title> Le Banc Moussu Formulaire | so Different | Brocante - DÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©coration</title>
<meta name="Author" content="Le Banc Moussu">
<meta name="Keywords" content="Brocante, DÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©coration, Chiner, DÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©coratif, AntiquitÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©s, DÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©corer, experiments, demonstrations, menu, horizontal, dropdown, drop, multi, level, cross, browser, valid, professional, column, drop, list, droplist">
<meta name="Description" content="Espace de vente d'objets de brocante et dÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©coratifs">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

<style>
body{
scrollbar-arrow-color:#70665D;
scrollbar-track-color:#70665D;
scrollbar-face-color:#A29783;
scrollbar-highlight-color:#A29783;
scrollbar-3dlight-color:#70665D;
scrollbar-darkshadow-color:#70665D;
scrollbar-shadow-color:#A29783;
}
td.menu{
background-color: #999933;
font: bold 11px/16px Arial, Helvetica ;
text-align: center;
margin: 0;
z-index: 4;
margin: 0 0 0 0;
padding: .0em 10px;
text-decoration: none;
color: #000000;
}
a.menu
{
font: bold 11px/16px Arial, Helvetica ;
color: #000000;
text-decoration: none;
}
</style>

<script type="text/javascript" id="sothink_dhtmlmenu"> <!--
st_siteroot="file:///C|/Temp/LeBancMoussu/Le%20Banc%20Moussu";
st_jspath="/stmenu.js";
if(!window.location.href.indexOf("file:") && st_jspath.charAt(0)=="/")
document.write('<script type="text/javascript" src="'+st_siteroot+st_jspath+'"><\/script>');
else
document.write('<script type="text/javascript" src="'+st_jspath+'"><\/script>');
//--> </script>

</head>
<!-- ESSAI -->
<body bgcolor="#999933">
<script type="text/javascript" id="sothink_dhtmlmenu"> <!--
st_siteroot="file:///C|/Temp/LeBancMoussu/Le%20Banc%20Moussu";
st_jspath="/stmenu.js";
if(!window.location.href.indexOf("file:") && st_jspath.charAt(0)=="/")
document.write('<script type="text/javascript" src="'+st_siteroot+st_jspath+'"><\/script>');
else
document.write('<script type="text/javascript" src="'+st_jspath+'"><\/script>');
//--> </script>

<table id="Table_01" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="middle">
<td align="center" bgcolor="999933">
<table width="980" height="550" border="0" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
<td colspan="3"><img src="images/logo_lebancmoussu.gif" width="980" height="55" alt="">
</td>
</tr>
<tr>
<td colspan="3">
<img src="file:///C|/Temp/LeBancMoussu/LeBancMoussu/images/index_02.gif" width="980" height="1" alt="">
</td>
</tr>
<tr>
<td rowspan="2">
<img src="images/index_03.png" width="40" height="546" alt=""> </td>
<td width="978" height="493" bgcolor="999933">
<a href="http://www.dhtml-menu-builder.com" style="display:none;visibility:hidden;">Javascript DHTML Drop Down Menu Powered by dhtml-menu-builder.com</a>
<script type="text/javascript">
<!--
st_siteroot="file:///C|/Temp/LeBancMoussu/Le%20Banc%20Moussu";
st_jspath="/DHTML%20menu.js";
if(!window.location.href.indexOf("file:") && st_jspath.charAt(0)=="/")
document.write('<script type="text/javascript" src="'+st_siteroot+st_jspath+'"><\/script>');
else
document.write('<script type="text/javascript" src="'+st_jspath+'"><\/script>');
//--> </script>


<style>
a.imgindex{
font: 10px/16px Arial, Helvetica;
color: #ffffff;
text-decoration: none;
}

a{
font: 10px/16px Arial, Helvetica;
text-decoration: none;
}

td.menu2{
background-color: transparent;
font: bolder 11px/20px Arial, Helvetica ;
text-align: center;
margin: 0;
z-index: 4;
margin: 0 0 0 0;
padding: .0em 10px;
text-decoration: none;
width: 150px;
color: #000000;
}

table.table1{
border: 1px solid #000000 ;
font: 12px Arial, Helvetica;
padding-left: 10px;
padding-right: 10px;
opacity:.80;filter: alpha(opacity=80);-moz-opacity: 0.80;
}
</style>
<!-- FIN D'ESSAI -->

<body><form name="mail_form" method="post" action="<?=$_SERVER['PHP_SELF']?>">
<div align="center">
<p> </p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif, Tahoma"><strong>Formulaire
de contact</strong></font></p>
</div><br><table align="center" width="566" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="16"><div align="center">
<font color="#CC0000" size="2" face="Verdana, Arial, Helvetica, sans-serif, Tahoma"><strong><?php
if ($erreur_champ1) {
echo(stripslashes($erreur_champ1));
} else {
if ($erreur_email1) {
echo(stripslashes($erreur_email1));
} else {
if ($erreur_liste1) {
echo(stripslashes($erreur_liste1));
} else {
if ($erreur_bouton1) {
echo(stripslashes($erreur_bouton1));
} else {
if ($erreur_case1) {
echo(stripslashes($erreur_case1));
} else {
if ($erreur_texte1) {
echo(stripslashes($erreur_texte1));
} else {
} // Fin du else...
} // Fin du else...
} // Fin du else...
} // Fin du else...
} // Fin du else...
} // Fin du else...
?>
</strong></font>
</div></td>
</tr>
</table>
<p align="center"></p><table width="700" border="0" align="center"><tr>
<td width="183"><div align="right"><font face="Verdana" size="2">Sujet du message :</font></div></td>
<td align="center" valign="middle" width="17">
<?php
if ($erreur_champ1) {
echo($icone);
}
?> </td>
<td width="486"><input name="champ1" type="text" value="<?=stripslashes($_SESSION['champ1']);?>"></td>
</tr></table><table width="700" border="0" align="center"><tr>
<td width="183"><div align="right"><font face="Verdana" size="2">e-mail pour la réponse :</font></div></td>
<td width="17" align="center" valign="middle">
<?php
if ($erreur_email1) {
echo($icone);
}
?> </td>
<td width="486"><input name="zone_email1" type="text" value="<?=stripslashes($_SESSION['zone_email1']);?>"></td>
</tr></table><table width="700" border="0" align="center"><tr>
<td width="183"><div align="right"><font face="Verdana" size="2">Rubrique :</font></div></td>
<td width="17" align="center" valign="middle">
<?php
if ($erreur_liste1) {
echo($icone);
}
?> </td>
<td width="486"><select name="liste1" style="width:146"><option value="">Sélectionner...</option>
<option value="Brocante"<?php
if ($_SESSION['liste1'] == "Brocante") {
echo(" selected");
}
?>>Brocante</option>
<option value="DÃf©coration"<?php
if ($_SESSION['liste1'] == "DÃf©coration") {
echo(" selected");
}
?>>DÃf©coration</option>
<option value="Peintures"<?php
if ($_SESSION['liste1'] == "Peintures") {
echo(" selected");
}
?>>Peintures</option>
</select></td></tr></table><table width="700" border="0" align="center"><tr>
<td width="183"><div align="right"><font face="Verdana" size="2">Motif de la demande :</font></div></td>
<td width="17" align="center" valign="middle">
<?php
if ($erreur_bouton1) {
echo($icone);
}
?> </td>
<td width="486"><input type="radio" name="bouton1" value="aaaaa"<?php
if ($_SESSION['bouton1'] == "aaaaa") {
echo(" checked");
}
?>>
<font face="Verdana" size="2">Renseignement</font>s<br>
<input type="radio" name="bouton1" value="bbbb"<?php
if ($_SESSION['bouton1'] == "bbbb") {
echo(" checked");
}
?>>
<font size="2" face="Verdana">Réservation</font>
<br>
<input type="radio" name="bouton1" value="cccc"<?php
if ($_SESSION['bouton1'] == "cccc") {
echo(" checked");
}
?>>
<font size="2" face="Verdana">Achat</font></td>
</tr></table><table width="700" border="0" align="center"><tr>
<td width="183"><div align="right"><font face="Verdana" size="2">Urgent :</font></div></td>
<td width="17" align="center" valign="middle">
<?php
if ($erreur_case1) {
echo($icone);
}
?> </td>
<td width="486"><input type="checkbox" name="case1_[0]" id="case1_" value="oui"<?php
if ($_SESSION['case1_'][0] == "oui") {
echo(" checked");
}
?>><font face="Verdana" size="2">oui</font><br><input type="checkbox" name="case1_[1]" id="case1_" value="non"<?php
if ($_SESSION['case1_'][1] == "non") {
echo(" checked");
}
?>><font face="Verdana" size="2">non</font></td></tr></table><table width="700" border="0" align="center"><tr>
<td width="186" valign="top"><div align="right"><font face="Verdana" size="2">Entrez votre message :</font></div></td>
<td width="17" align="right" valign="top">
<?php
if ($erreur_texte1) {
echo($icone);
}
?> </td>
<td width="483"><textarea name="zone_texte1" cols="58" rows="10"><?=stripslashes($_SESSION['zone_texte1']);?></textarea></td>
</tr></table><table width="700" border="0" align="center"><tr>
<td valign="top"><div align="center">
<input type="reset" name="Reset" value=" Effacer ">

<input type="submit" name="envoi" value="Envoyer">
<input type="button" value="Retour" onClick="history.go(-2)">
</div></td></tr></table><div align="center"><input name="nbre_fichiers" type="hidden" id="nbre_fichiers" value=""></div></form></body></html>
0
idoru Messages postés 5 Date d'inscription lundi 3 mai 2010 Statut Membre Dernière intervention 1 juin 2010
5 mai 2010 à 18:57
Bonjour et merci d'essayer de m'aider à y voir plus clair !

J'ai essayé de coller le code html de la page appelante et le php de ma page de contact mais rien ne se passe lorsque je clic sur valider, aussi je réduis au maximum:

voici ce que je fais en html:

</div>
<div class="meniItem"><a href="contact.php?champ1=reserver&liste1=brocante&bouton1=réservation&zone_texte1=bacchus" class="Style1">Réserver</a></div>
</div>

et le code ma page contact en php:

<?php
$desactive = ini_get('disable_functions');
if (preg_match("/ini_set/i", "$desactive") == 0) {
ini_set("error_reporting" , "E_ALL & ~E_NOTICE");
}
if (isset($_POST['envoi'])) {
session_start();
$_SESSION['champ1'] = $_POST['champ1'];
$_SESSION['zone_email1'] = $_POST['zone_email1'];
$_SESSION['liste1'] = $_POST['liste1'];

switch($_POST['bouton1']) {
case "aaaaa":
$_SESSION['bouton1'] = "aaaaa";
break;
case "bbbb":
$_SESSION['bouton1'] = "bbbb";
break;
case "cccc":
$_SESSION['bouton1'] = "cccc";
break;
default:
$_SESSION['bouton1'] = "";
$_SESSION['case1_'][0] = "";
if (isset($_POST['case1_'][0])) {
$_SESSION['case1_'][0] = $_POST['case1_'][0];
}

$_SESSION['case1_'][1] = "";
if (isset($_POST['case1_'][1])) {
$_SESSION['case1_'][1] = $_POST['case1_'][1];
}
$_SESSION['zone_texte1'] = $_POST['zone_texte1'];
$flag_icone = 0;
if ($flag_icone == 0) {
$icone = "<b><font size=\"3\" face=\"Arial, Verdana, Helvetica, sans-serif\" color=\"#CC0000\">x</font></b>";
} else {
$icone = "<img src=\"images/icone.gif\"";
}
$flag_erreur = 0;
if ($flag_erreur == 0) {
$email_dest = "monmail@free.fr";
$sujet = "Données en provenance du formulaire de contact";
$entetes ="MIME-Version: 1.0 \n";
$entetes .="From: lebancmoussu<form@lebancmoussu.com>\n";
$entetes .="Return-Path: lebancmoussu<form@lebancmoussu.fr>\n";
$entetes .="Reply-To: lebancmoussu<form@lebancmoussu.fr>\n";
$entetes .="Content-Type: text/html; charset=iso-8859-1 \n";
$partie_entete = "<html>\n<head>\n<title>Formulaire</title>\n<meta http-equiv=Content-Type content=text/html; charset=iso-8859-1>\n</head>\n<body bgcolor=#FFFFFF>\n";



$partie_champs_texte .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Sujet de votre message : = " . $_SESSION['champ1'] . "</font><br>\n";
$partie_zone_email .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Adresse e-mail pour la rÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©ponse : = " . $_SESSION['zone_email1'] . "</font><br>\n";
$partie_listes .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Choix : = " . $_SESSION['liste1'] . "</font><br>\n";
$partie_boutons .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">bouton radio = " . $_SESSION['bouton1'] . "</font><br>\n";
$partie_cases .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">case ÃfÆ'Ã+â€(TM)Ãfâ€sÃ' cocher</font><br>\n";
$partie_cases .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Case 1 = " . $_SESSION['case1_'][0] . "</font><br>\n";
$partie_cases .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Case 2 = " . $_SESSION['case1_'][1] . "</font><br>\n";
$partie_zone_texte .= "<font face=\"Verdana\" size=\"2\" color=\"#003366\">Entrez votre message : = " . $_SESSION['zone_texte1'] . "</font><br>\n";
// Fin du message HTML
$fin = "</body></html>\n\n";

$sortie = $partie_entete . $partie_champs_texte . $partie_zone_email . $partie_listes . $partie_boutons . $partie_cases . $partie_zone_texte . $fin;

// Send the e-mail
if (@!mail($email_dest,$sujet,$sortie,$entetes)) {
echo("Envoi du formulaire impossible");
exit();
} else {

// Rediriger vers la page de remerciement
header("Location:merci.html");
exit();
} // Fin else
} // Fin du if ($flag_erreur == 0) {
} // Fin de if POST
?>
<html>
<!--
-->

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<head>
<title> Le Banc Moussu Formulaire | so Different | Brocante - DÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©coration</title>
<meta name="Author" content="Le Banc Moussu">
<meta name="Keywords" content="Brocante, ">
<meta name="Description" content="Espace de vente d'objets de brocante et dÃfÆ'Ã+â€(TM)Ãfâ€sÃ'©coratifs">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>


<script type="text/javascript" id="sothink_dhtmlmenu"> <!--
st_siteroot="file:///C|/Temp/LeBancMoussu/Le%20Banc%20Moussu";
st_jspath="/stmenu.js";
if(!window.location.href.indexOf("file:") && st_jspath.charAt(0)=="/")
document.write('<script type="text/javascript" src="'+st_siteroot+st_jspath+'"><\/script>');
else
document.write('<script type="text/javascript" src="'+st_jspath+'"><\/script>');
//--> </script>

</head>
<!-- ESSAI -->
<body bgcolor="#999933">
<script type="text/javascript" id="sothink_dhtmlmenu"> <!--
st_siteroot="file:///C|/Temp/LeBancMoussu/Le%20Banc%20Moussu";
st_jspath="/stmenu.js";
if(!window.location.href.indexOf("file:") && st_jspath.charAt(0)=="/")
document.write('<script type="text/javascript" src="'+st_siteroot+st_jspath+'"><\/script>');
else
document.write('<script type="text/javascript" src="'+st_jspath+'"><\/script>');
//--> </script>

<table id="Table_01" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="middle">
<td align="center" bgcolor="999933">
<table width="980" height="550" border="0" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
<td colspan="3"><img src="images/logo_lebancmoussu.gif" width="980" height="55" alt="">
</td>
</tr>
<tr>
<td colspan="3">
<img src="file:///C|/Temp/LeBancMoussu/LeBancMoussu/images/index_02.gif" width="980" height="1" alt="">
</td>
</tr>
<tr>
<td rowspan="2">
<img src="images/index_03.png" width="40" height="546" alt=""> </td>
<td width="978" height="493" bgcolor="999933">
<a href="http://www.dhtml-menu-builder.com" style="display:none;visibility:hidden;">Javascript DHTML Drop Down Menu Powered by dhtml-menu-builder.com</a>
<script type="text/javascript">
<!--
st_siteroot="file:///C|/Temp/LeBancMoussu/Le%20Banc%20Moussu";
st_jspath="/DHTML%20menu.js";
if(!window.location.href.indexOf("file:") && st_jspath.charAt(0)=="/")
document.write('<script type="text/javascript" src="'+st_siteroot+st_jspath+'"><\/script>');
else
document.write('<script type="text/javascript" src="'+st_jspath+'"><\/script>');
//--> </script>



<!-- FIN D'ESSAI -->

<body><form name="mail_form" method="post" action="<?=$_SERVER['PHP_SELF']?>">
<div align="center">
<p> </p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif, Tahoma"><strong>Formulaire
de contact</strong></font></p>
</div><br><table align="center" width="566" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="16"><div align="center">
<font color="#CC0000" size="2" face="Verdana, Arial, Helvetica, sans-serif, Tahoma"><strong><?php
if ($erreur_champ1) {
echo(stripslashes($erreur_champ1));
} else {
if ($erreur_email1) {
echo(stripslashes($erreur_email1));
} else {
if ($erreur_liste1) {
echo(stripslashes($erreur_liste1));
} else {
if ($erreur_bouton1) {
echo(stripslashes($erreur_bouton1));
} else {
if ($erreur_case1) {
echo(stripslashes($erreur_case1));
} else {
if ($erreur_texte1) {
echo(stripslashes($erreur_texte1));
} else {
} // Fin du else...
} // Fin du else...
} // Fin du else...
} // Fin du else...
} // Fin du else...
} // Fin du else...
?>
</strong></font>
</div></td>
</tr>
</table>
<p align="center"></p><table width="700" border="0" align="center"><tr>
<td width="183"><div align="right"><font face="Verdana" size="2">Sujet du message :</font></div></td>
<td align="center" valign="middle" width="17">
<?php
if ($erreur_champ1) {
echo($icone);
}
?> </td>
<td width="486"><input name="champ1" type="text" value="<?=stripslashes($_SESSION['champ1']);?>"></td>
</tr></table><table width="700" border="0" align="center"><tr>
<td width="183"><div align="right"><font face="Verdana" size="2">e-mail pour la réponse :</font></div></td>
<td width="17" align="center" valign="middle">
<?php
if ($erreur_email1) {
echo($icone);
}
?> </td>
<td width="486"><input name="zone_email1" type="text" value="<?=stripslashes($_SESSION['zone_email1']);?>"></td>
</tr></table><table width="700" border="0" align="center"><tr>
<td width="183"><div align="right"><font face="Verdana" size="2">Rubrique :</font></div></td>
<td width="17" align="center" valign="middle">
<?php
if ($erreur_liste1) {
echo($icone);
}
?> </td>
<td width="486"><select name="liste1" style="width:146"><option value="">Sélectionner...</option>
<option value="Brocante"<?php
if ($_SESSION['liste1'] == "Brocante") {
echo(" selected");
}
?>>Brocante</option>
<option value="DÃf©coration"<?php
if ($_SESSION['liste1'] == "DÃf©coration") {
echo(" selected");
}
?>>DÃf©coration</option>
<option value="Peintures"<?php
if ($_SESSION['liste1'] == "Peintures") {
echo(" selected");
}
?>>Peintures</option>
</select></td></tr></table><table width="700" border="0" align="center"><tr>
<td width="183"><div align="right"><font face="Verdana" size="2">Motif de la demande :</font></div></td>
<td width="17" align="center" valign="middle">
<?php
if ($erreur_bouton1) {
echo($icone);
}
?> </td>
<td width="486"><input type="radio" name="bouton1" value="aaaaa"<?php
if ($_SESSION['bouton1'] == "aaaaa") {
echo(" checked");
}
?>>
<font face="Verdana" size="2">Renseignement</font>s<br>
<input type="radio" name="bouton1" value="bbbb"<?php
if ($_SESSION['bouton1'] == "bbbb") {
echo(" checked");
}
?>>
<font size="2" face="Verdana">Réservation</font>
<br>
<input type="radio" name="bouton1" value="cccc"<?php
if ($_SESSION['bouton1'] == "cccc") {
echo(" checked");
}
?>>
<font size="2" face="Verdana">Achat</font></td>
</tr></table><table width="700" border="0" align="center"><tr>
<td width="183"><div align="right"><font face="Verdana" size="2">Urgent :</font></div></td>
<td width="17" align="center" valign="middle">
<?php
if ($erreur_case1) {
echo($icone);
}
?> </td>
<td width="486"><input type="checkbox" name="case1_[0]" id="case1_" value="oui"<?php
if ($_SESSION['case1_'][0] == "oui") {
echo(" checked");
}
?>><font face="Verdana" size="2">oui</font><br><input type="checkbox" name="case1_[1]" id="case1_" value="non"<?php
if ($_SESSION['case1_'][1] == "non") {
echo(" checked");
}
?>><font face="Verdana" size="2">non</font></td></tr></table><table width="700" border="0" align="center"><tr>
<td width="186" valign="top"><div align="right"><font face="Verdana" size="2">Entrez votre message :</font></div></td>
<td width="17" align="right" valign="top">
<?php
if ($erreur_texte1) {
echo($icone);
}
?> </td>
<td width="483"><textarea name="zone_texte1" cols="58" rows="10"><?=stripslashes($_SESSION['zone_texte1']);?></textarea></td>
</tr></table><table width="700" border="0" align="center"><tr>
<td valign="top"><div align="center">
<input type="reset" name="Reset" value=" Effacer ">

<input type="submit" name="envoi" value="Envoyer">
<input type="button" value="Retour" onClick="history.go(-2)">
</div></td></tr></table><div align="center"><input name="nbre_fichiers" type="hidden" id="nbre_fichiers" value=""></div></form></body></html>
0