Pages vues depuis 25/05/2001 : 108 403 283
Index du forum »» SFORM »» [Résolu] - Sform pour formulaire à saisir sur le forum ET simultanément pour envoi par E-mail ?
/************************************************************************/
$sform_path="modules/sform/";
!include!_once($sform_path."sform.php");
global $m;
$m=new form_handler();
//********************
$m->add_form_title("Constat_Etat_Critique");
$m->add_form_method("post");
$m->add_form_check("false");
$m->add_mess(" * désigne un champ obligatoire ");
$m->add_submit_value("submitS");
$m->add_!url(!"newtopic.php");
/************************************************/
!include!($sform_path."forum/$formulaire");
/************************************************/
if( !isset($GLOBALS["submitS"]) ){
echo $m->print_form("class=\"LIGNA\"");
/***************** ici test début *******************************/
$m->make_response();
$message=$m->aff_response("white","not_echo","");
$message="<html><body>".$message."</body></html>";
send_email("adresse_une@exemple.be,adresse_deux@exemple.be", $m->title,$message,"","","html");
/***************** ici test fin *********************************/
} else {
$message=$m->aff_response("class=\"LIGNA\"","not_echo","");
}
?>
$sform_path="modules/sform/";
!!include!!_once($sform_path."sform.php");
global $m;
$m=new form_handler();
$m->add_form_title("titre_du_formulaire");
$m->add_form_method("post");
$m->add_form_check("false");
$m->add_mess(" * désigne un champ obligatoire ");
$m->add_submit_value("submitS");
$m->add_!!url(!!"newtopic.php");
!!include!!($sform_path."forum/$formulaire");
if( !isset($GLOBALS["submitS"]) ){
echo $m->print_form("class=\"LIGNA\"");
} else {
$m->make_response();
$message=$m->aff_response("white","not_echo","");
$message="".$message."";
send_email("adresse_une@mon_domaine.be,adresse_deux@mon_domaine.eu", $m->title,$message,"","","html");
}
?>
Message édité par : Patrick / 11-11-2005 21:48