$val){ echo $cle." => ".$val."
"; $$cle=$val; } $query=" SELECT * from eta WHERE id_eta=:num_eta "; $db = connect_base(); $queryRequest = $db->prepare( $query ); $queryRequest->bindParam( ':num_eta', $ncfa, PDO::PARAM_INT ); $queryRequest->execute(); $dataCfa=$queryRequest->fetchAll(); $countCfa = $queryRequest->rowCount(); if($countCfa!=1){ //CFA introuvable header('location:./'); exit(); } $maCleDeCryptage = getCleDeCryptage(); $nomEta = decrypter($maCleDeCryptage,$dataCfa[0]['nom_eta']); $emailEta = decrypter($maCleDeCryptage,$dataCfa[0]['email_ref']); require 'config/class.phpmailer.php'; require 'config/phpmailer.settings.php'; $to=$emailEta; $objet="Demande de contact sur le site DECIDAY"; $affich=''; $affich.=''; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.='
 
Bonjour,
 
Dans le cadre de l\'évènement Déciday !, un collège souhaite prendre contact avec vous.
 
Etablissement : '.$etaCoLy.'
Nom : '.$nomCoLy.'
Prénom : '.$prenomCoLy.'
Fonction : '.$fonctionCoLy.'
Ligne directe : '.$telCoLy.'
E-mail : '.$emlCoLy.'
Adresse 1 : '.$adresse1CoLy.'
Adresse 2 : '.$adresse2CoLy.'
Code postal : '.$cpCoLy.'
Ville : '.$villeCoLy.'
Nombre de classes : '.$nbClasses.'
Nombre total d\'élèves concernés : '.$nbEleves.'
Commentaires : '.nl2br($commentCoLy).'
 
Cordialement.
 
L\'équipe DECIDAY.
'; $mail->IsHTML(true); $mail->AddEmbeddedImage('images/bandeau-contact.jpg', 'bando', 'bandeau-contact.jpg'); $mail->Subject = utf8_decode($objet); $mail->Body = utf8_decode($affich); $mail->AddAddress($to); $mail->AltBody = "/-------//--------/"; $mail->send(); $_SESSION['msg']='Votre demande a bien été envoyée.'; header('location:contact-eta.php'); exit(); } ?>