IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

Images mail auto


Sujet :

Langage PHP

  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut Images mail auto
    bonjour

    j'ai un message automatique qui et envoyé par mail pour que les gens puissent validé leur inscription et je voulais mètre une ou 2 images mais cela ne marche pas.

    comment puis je faire merci de votre aide

    voici mon code :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
     
    if($environement_site == 2)
        {
        if($validation_site == 1)
            mail($_POST['email'], '['. $nom_site .']'.INSCRIPTION_TITRE, INSCRIPTION_MAIL_PARTIE_1. $nom_site .".
     
    ""alt="<img src='http://ysoral.free.fr/images/header-photo.jpg '/>"
    ". INSCRIPTION_MAIL_PARTIE_2 ."
    ". INSCRIPTION_PSEUDO ." : ". $_POST['pseudo'] ."
    ". INSCRIPTION_PASS ." : ". $_POST['mdp'] ."
     
    ". INSCRIPTION_MAIL_VALIDATION_1 ."
    ". $adresse_site ."validation_mail.php?id=". $alea ."
     
     
    ". INSCRIPTION_MAIL_FORMULES ."
    ". $nom_sit, "From: ". $nom_site ."<message automatique@". $nom_site .">");
     
        if($validation_site == 3 OR $validation_site == 2)
            mail($_POST['email'], '['. $nom_site .']'.INSCRIPTION_TITRE, INSCRIPTION_MAIL_PARTIE_1. $nom_site .".
    ". INSCRIPTION_MAIL_PARTIE_2 ."
    ". INSCRIPTION_PSEUDO ." : ". $_POST['pseudo'] ."
    ". INSCRIPTION_PASS ." : ". $_POST['mdp'] ."
     
    ________________________
    ". INSCRIPTION_MAIL_FORMULES ."
    ". $nom_site, "From: ". $nom_site ."<message automatique@". $nom_site .">");
        }
     
    }   else    {

  2. #2
    Expert confirmé Avatar de papajoker
    Homme Profil pro
    Développeur Web
    Inscrit en
    Septembre 2013
    Messages
    2 104
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nièvre (Bourgogne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2013
    Messages : 2 104
    Points : 4 454
    Points
    4 454
    Par défaut
    Bonjour,

    ce n'est pas le alt="" dans la ligne 7 , qui est mal placé ?

    ""alt="<img src='http://ysoral.free.fr/images/header-photo.jpg '/>"
    en html

    $moi= ( !== ) ? : ;

  3. #3
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut
    merci pour la réponse mais cela ne marche pas j'ai fait cela :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    if($environement_site == 2)
    	{
    	if($validation_site == 1)
    		mail($_POST['email'], '['. $nom_site .']'.INSCRIPTION_TITRE, INSCRIPTION_MAIL_PARTIE_1. $nom_site .".
     
    "<img src="http://ysoral.free.fr/images/header-photo.jpg " alt=" "/>"
    ". INSCRIPTION_MAIL_PARTIE_2 ."
    ". INSCRIPTION_PSEUDO ." : ". $_POST['pseudo'] ."
    ". INSCRIPTION_PASS ." : ". $_POST['mdp'] ."
     
    ". INSCRIPTION_MAIL_VALIDATION_1 ."
    ". $adresse_site ."validation_mail.php?id=". $alea ."
     
     
    ". INSCRIPTION_MAIL_FORMULES ."
    ". $nom_sit, "From: ". $nom_site ."<message automatique@". $nom_site .">");
     
    	if($validation_site == 3 OR $validation_site == 2)
    		mail($_POST['email'], '['. $nom_site .']'.INSCRIPTION_TITRE, INSCRIPTION_MAIL_PARTIE_1. $nom_site .".
    ". INSCRIPTION_MAIL_PARTIE_2 ."
    ". INSCRIPTION_PSEUDO ." : ". $_POST['pseudo'] ."
    ". INSCRIPTION_PASS ." : ". $_POST['mdp'] ."
     
    ________________________
    ". INSCRIPTION_MAIL_FORMULES ."
    ". $nom_site, "From: ". $nom_site ."<message automatique@". $nom_site .">");
    	}
     
    }	else	{

  4. #4
    Expert éminent sénior

    Homme Profil pro
    Développeur Web
    Inscrit en
    Septembre 2010
    Messages
    5 382
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2010
    Messages : 5 382
    Points : 10 410
    Points
    10 410
    Par défaut
    Tu veux faire quoi, joindre une image dans ton mail ? Si oui il faut utiliser la technique des fichiers joints.

  5. #5
    Expert confirmé Avatar de papajoker
    Homme Profil pro
    Développeur Web
    Inscrit en
    Septembre 2013
    Messages
    2 104
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nièvre (Bourgogne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2013
    Messages : 2 104
    Points : 4 454
    Points
    4 454
    Par défaut
    Normal que cela ne marche pas vous mettez des chaines dans des chaines, php est perdu !

    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    "<img src="http://ysoral.free.fr/images/header-photo.jpg " alt=" "/>"

    alt="" pas bon !!

    @ABCIWEB pour l'instant il collectionne les parse errors
    $moi= ( !== ) ? : ;

  6. #6
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut
    je veux afficher une image dans le mail oui mais je ne comprend vraiment pas comment faire j ai voulu faire ceci


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    if($environement_site == 2)
    	{
    	if($validation_site == 1)
    		mail($_POST['email'], '['. $nom_site .']'.INSCRIPTION_TITRE, INSCRIPTION_MAIL_PARTIE_1. $nom_site .".
     
    "<img src="http://ysoral.free.fr/images/header-photo.jpg "/>"
    ". INSCRIPTION_MAIL_PARTIE_2 ."
    ". INSCRIPTION_PSEUDO ." : ". $_POST['pseudo'] ."
    ". INSCRIPTION_PASS ." : ". $_POST['mdp'] ."
     
    ". INSCRIPTION_MAIL_VALIDATION_1 ."
    ". $adresse_site ."validation_mail.php?id=". $alea ."
     
     
    ". INSCRIPTION_MAIL_FORMULES ."
    ". $nom_sit, "From: ". $nom_site ."<message automatique@". $nom_site .">");
     
    	if($validation_site == 3 OR $validation_site == 2)
    		mail($_POST['email'], '['. $nom_site .']'.INSCRIPTION_TITRE, INSCRIPTION_MAIL_PARTIE_1. $nom_site .".
    ". INSCRIPTION_MAIL_PARTIE_2 ."
    ". INSCRIPTION_PSEUDO ." : ". $_POST['pseudo'] ."
    ". INSCRIPTION_PASS ." : ". $_POST['mdp'] ."
     
    ________________________
    ". INSCRIPTION_MAIL_FORMULES ."
    ". $nom_site, "From: ". $nom_site ."<message automatique@". $nom_site .">");
    	}
     
    }	else	{

  7. #7
    Membre averti
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    251
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 251
    Points : 383
    Points
    383
    Par défaut
    Une piste : remplaces ça

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    "<img src="http://ysoral.free.fr/images/header-photo.jpg "/>"
    par ça

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    "<img src=\"http://ysoral.free.fr/images/header-photo.jpg\" alt=\"logo\" />"
    Et il y a un espace après .jpg qui ne devrait pas être là

  8. #8
    Expert confirmé Avatar de papajoker
    Homme Profil pro
    Développeur Web
    Inscrit en
    Septembre 2013
    Messages
    2 104
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nièvre (Bourgogne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2013
    Messages : 2 104
    Points : 4 454
    Points
    4 454
    Par défaut
    une autre piste @fenixdragon

    regarde les couleurs !

    et si possible utilise un éditeur qui reconnait php, avec les couleurs tu vas te retrouver.
    $moi= ( !== ) ? : ;

  9. #9
    Expert éminent sénior

    Homme Profil pro
    Développeur Web
    Inscrit en
    Septembre 2010
    Messages
    5 382
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2010
    Messages : 5 382
    Points : 10 410
    Points
    10 410
    Par défaut
    Il y a un tuto pour envoyer un mail et une image ici :
    http://a-pellegrini.developpez.com/t...php/mail/#L3.4

  10. #10
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut
    j ai code mais je ne trouve toujours pas toujours un bug
    peut ton m' aider ?
    voici tout le code :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    <?php
     
    session_start();
    if(@$_SESSION['session']) exit;		//Si la personne est identifiée, on lui interdit l'accès à la page d'inscription
     
    include_once 'recup_config.php';	//On récupère la configuration du script
    $titre_page = INSCRIPTION_TITRE;			//Définition du titre de la page
    include_once 'haut.php';			//on affiche le haut (header)
    ?>
    <script type="text/javascript" src="js/func.js"></script>	
    <script type="text/javascript" src="js/date.js"></script>	
    <script type="text/javascript">
    $(document).ready(function(){
       $("#age").inputmask("j/m/a");
       $("#age").inputmask("j/m/a");
       $("#age").inputmask("date"); // alias for dd/mm/yyyy
       $("#date").inputmask("date", {yearrange: { minyear: 1900, maxyear: 2014 }}); //specify year range
    });</script>
    <div id=header_inscription> 
     
    <div id=portable> 
     
     
     
     
     
     
     
     
     
    	<div class=ejs_heure id="ejs_heure">16:18</div>
    <a href="index.php" class=index_insciption >Retour</a>
     
    <form id="form" name="form" method="post" action="inscription.php" onsubmit="return controlvide();" > 
     
     <div class="boutton_inscription"><input type="submit"id="clickMe"  value="Inscription" name="envoi"class="button_insc"></div>
    			<div class="inscription_n2">
    		    <div class="femme"><input type="radio" name="hf" value="Femme" id="hf2"> <label for="hf2"></label></div>
    		<div class="homme"><input type="radio"  name="hf" value="Homme" id="hf">   <label for="hf"></label>   </div>
     
     
        <input name="pseudo"size= 27 type="text" class="champs_inscription" id="pseudo" value="<?php echo htmlentities($_POST['pseudo']);?>" placeholder="Nom et prénom (pseudo)" /><span class="error"></span>
        <input name="email"size= 27 type="text" class="champs_inscription" id="email"value="<?php echo htmlentities($_POST['email']);?>" placeholder="Adresse e-mail"/><span class="error"></span>
        <input name="mdp"size= 27 type="password" class="champs_inscription" id="mdp" value="<?php echo htmlentities($_POST['mdp']);?>"placeholder="Mot de passe" /><span class="error"></span>
     
        <input name="email2"size= 27 type="text" class="champs_inscription" id="email2" value="<?php echo htmlentities($_POST['email2']);?>" placeholder="Comfirme ton adresse e-mail" /><span class="error"></span>
     <div align="center">   <input name="mdp2"size= 27 type="password" class="champs_inscription" id="mdp2" placeholder="Comfirme ton mot de passe" /><span class="error"></span>
     
    </div>
     
    	<div align="center"><input type="text"size=10 name="age"class="champs_inscription" id="age" placeholder ="Né(e) le" /><span class="error"></span>
    </div>
     
     
    </form>
     </div>
    <div class="texte">
    	 En cliquant sur Inscription,<br> tu acceptes nos   <a class=".zoombox_next zoombox w1100 h540 gallery " href="popup/boite3.php">conditions d'utilisation. </a><br />
       Tu recevras un e-mail qui valide ta pré-inscription. </div>
    </div>
     
    <div class="erreur_inscription">
    <?php
     
    if(isset($_POST['email2']))
    {
            $email = stripslashes(htmlentities($_POST['email2']));
            if(preg_match('#^(([a-z0-9!\#$%&\\\'*+/=?^_`{|}~-]+\.?)*[a-z0-9!\#$%&\\\'*+/=?^_`{|}~-]+)@(([a-z0-9-_]+\.?)*[a-z0-9-_]+)\.[a-z]{2,}$#i',str_replace('&amp;','&',$email))){
                  echo '';
             }else{
               echo 'Ton adresse e-mail est incorrecte.';}
       }else{      
    }
    echo '<br>';
    if( isset($_POST['envoi']) )	{
     
    require_once 'fonctions/formulaires.php';
     
    $_POST = form_secu($_POST, 'addslashes');
    $_POST = form_secu($_POST, 'htmlchars');
    $_POST = form_secu($_POST, 'trim');
     
    //// VERIFICATIONS BANALES ////
    if($_POST['mdp'] !== $_POST['mdp2'])
    	$erreur .=INSCRIPTION_ERREUR_PASS_IDENTIQUE ."<br />";
     
    if($_POST['email'] !== $_POST['email2'])
    	$erreur .=INSCRIPTION_ERREUR_EMAIL_IDENTIQUE ."<br />";
     
    if( strlen($erreur) > 5 )	{
    	echo $erreur ;
    	include_once 'bas.php';
    	exit;
    	}
    	connexion();
    //// VERIFICATIONS DES EXISTANCES ////
    $reponse_mail = @mysql_query("SELECT email FROM ". PREFIX ."membres WHERE email='". $_POST['email'] ."'") or die ('Erreur de vérification d\'e-mail déjà existant');	//verification si e-mail existe déjà
    $count_mail = @mysql_num_rows($reponse_mail);
    if($count_mail === 1)
    	$erreur .=INSCRIPTION_DEJA_EMAIL ."<br />";
     
     
    if( strlen($erreur) > 5 )	{
    	echo $erreur ;
    	exit;
     
    	}
     
    $alea = id_aleatoire();	//Création d'un identifiant aléatoire
     
    $passe = md5($_POST['mdp']);	//Encodage en md5 (c'est pas le plus sécurisé possible)
     
    if($environement_site == 1 AND $validation_site == 1)	$validation_site = 3;		//Si on est en local, ca revient à ce qu'il n'y ai aucune validation par mail.
    $validation = 0;
    if($validation_site == 3) $validation = 1;
     
    mysql_query("INSERT INTO ". PREFIX ."membres VALUES ('', '". $alea ."', '". $_POST['pseudo'] ."', '". $passe ."', '". $_POST['email'] ."', '". $_POST['age'] ."',  '". $_POST['hf'] ."', ". $validation .", ". MEMBRE .") ") or die ('Erreur d\'insertion dans la base de données');
     
    if($validation_site == 1)
     
    echo'<div class=inscription_ok> ';
    	echo'<span style="color:#CCFF33;">', INSCRIPTION_MESSAGE_FIN,'<br />
    	', INSCRIPTION_MESSAGE_FIN_VALIDATION_1, '</span> ';
    echo'<br />';
    if($validation_site == 1)
    	echo'<span style="color:#CCFF33">', INSCRIPTION_MESSAGE_FIN_VALIDATION_2,'.<br />';
    echo'</div> ';
    if($validation_site == 3)
    	echo'<span style="color:#CCFF33">', INSCRIPTION_MESSAGE_FIN, $nom_site ,'.<br />
    	', INSCRIPTION_MESSAGE_FIN_VALIDATION_3, '</span>';
     
    if($environement_site == 2)
    	{
    	if($validation_site == 1)
    		mail($_POST['email'], '['. $nom_site .']'.INSCRIPTION_TITRE, INSCRIPTION_MAIL_PARTIE_1. $nom_site .".
    "<img src=\'http://ysoral.free.fr/images/header-photo.jpg\' alt=\'logo\' />"
    
    ". INSCRIPTION_MAIL_PARTIE_2 ."
    ". INSCRIPTION_PSEUDO ." : ". $_POST['pseudo'] ."
    ". INSCRIPTION_PASS ." : ". $_POST['mdp'] ."
    
    ". INSCRIPTION_MAIL_VALIDATION_1 ."
    ". $adresse_site ."validation_mail.php?id=". $alea ."
    
    
    ". INSCRIPTION_MAIL_FORMULES ."
    ". $nom_sit, "From: ". $nom_site ."<message automatique@". $nom_site .">");
    		
    	if($validation_site == 3 OR $validation_site == 2)
    		mail($_POST['email'], '['. $nom_site .']'.INSCRIPTION_TITRE, INSCRIPTION_MAIL_PARTIE_1. $nom_site .".
    ". INSCRIPTION_MAIL_PARTIE_2 ."
    ". INSCRIPTION_PSEUDO ." : ". $_POST['pseudo'] ."
    ". INSCRIPTION_PASS ." : ". $_POST['mdp'] ."
    
    ________________________
    ". INSCRIPTION_MAIL_FORMULES ."
    ". $nom_site, "From: ". $nom_site ."<message automatique@". $nom_site .">");
    	}
    	
    }	else	{
    ?>
    </div>
    <?php
    	}
    include_once 'bas.php';	//on affiche le bas (footer)
    ?>
    </div>

  11. #11
    Expert confirmé Avatar de papajoker
    Homme Profil pro
    Développeur Web
    Inscrit en
    Septembre 2013
    Messages
    2 104
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nièvre (Bourgogne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2013
    Messages : 2 104
    Points : 4 454
    Points
    4 454
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    $nom_site .".
    "<img src=\'http://ysoral.free.fr/images/header-photo.jpg\' alt=\'logo\' />"
    quelle cata !
    toujours le même problème (6 jours la dessus ), utilises un éditeur qui reconnait php et avec la couleur !
    (tu ne vois pas les couleurs ici ? <img src=\ en noir)

    vas lire la doc php sur les chaines
    $moi= ( !== ) ? : ;

  12. #12
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut
    j'ai cette erreur :

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /homez.764/www/inscription.php on line 140

  13. #13
    Expert confirmé Avatar de papajoker
    Homme Profil pro
    Développeur Web
    Inscrit en
    Septembre 2013
    Messages
    2 104
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nièvre (Bourgogne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2013
    Messages : 2 104
    Points : 4 454
    Points
    4 454
    Par défaut
    non, pas ligne 140, tu as une erreur parce que tu n'arrives pas a délimiter une chaine en php depuis 6 jours
    je t'ai mis + haut ou est l'erreur
    toujours pas compris a quoi servent les couleurs ? $monsite en vert, <img src=\ en noir ...
    $moi= ( !== ) ? : ;

  14. #14
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut
    j ai eu cette erreur après avoir corriger justement

  15. #15
    Expert confirmé Avatar de papajoker
    Homme Profil pro
    Développeur Web
    Inscrit en
    Septembre 2013
    Messages
    2 104
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nièvre (Bourgogne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2013
    Messages : 2 104
    Points : 4 454
    Points
    4 454
    Par défaut
    et oui, Toujours la même erreur qu'au premier post (ligne débute par ""alt=" )
    a ma premiere reponse, le 3, j'ai donné :
    toi tu écris et reécris :
    c'est trop dur de comprendre (6 jours !)que tu as juste un " en trop
    (ps: ai pas regardé tu as peut-être 3..4 fois ce caractère en trop )
    $moi= ( !== ) ? : ;

  16. #16
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut
    ça doit pas être si facile lol ou alors je suis vraiment nul car j'ai re codé pareil toujours une erreur

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    <?php
     
    session_start();
    if(@$_SESSION['session']) exit;		//Si la personne est identifiée, on lui interdit l'accès à la page d'inscription
     
    include_once 'recup_config.php';	//On récupère la configuration du script
    $titre_page = INSCRIPTION_TITRE;			//Définition du titre de la page
    include_once 'haut.php';			//on affiche le haut (header)
    ?>
    <script type="text/javascript" src="js/func.js"></script>	
    <script type="text/javascript" src="js/date.js"></script>	
    <script type="text/javascript">
    $(document).ready(function(){
       $("#age").inputmask("j/m/a");
       $("#age").inputmask("j/m/a");
       $("#age").inputmask("date"); // alias for dd/mm/yyyy
       $("#date").inputmask("date", {yearrange: { minyear: 1900, maxyear: 2014 }}); //specify year range
    });</script>
    <div id=header_inscription> 
     
    <div id=portable> 
     
     
     
     
     
     
     
     
     
    	<div class=ejs_heure id="ejs_heure">16:18</div>
    <a href="index.php" class=index_insciption >Retour</a>
     
    <form id="form" name="form" method="post" action="inscription.php" onsubmit="return controlvide();" > 
     
     <div class="boutton_inscription"><input type="submit"id="clickMe"  value="Inscription" name="envoi"class="button_insc"></div>
    			<div class="inscription_n2">
    		    <div class="femme"><input type="radio" name="hf" value="Femme" id="hf2"> <label for="hf2"></label></div>
    		<div class="homme"><input type="radio"  name="hf" value="Homme" id="hf">   <label for="hf"></label>   </div>
     
     
        <input name="pseudo"size= 27 type="text" class="champs_inscription" id="pseudo" value="<?php echo htmlentities($_POST['pseudo']);?>" placeholder="Nom et prénom (pseudo)" /><span class="error"></span>
        <input name="email"size= 27 type="text" class="champs_inscription" id="email"value="<?php echo htmlentities($_POST['email']);?>" placeholder="Adresse e-mail"/><span class="error"></span>
        <input name="mdp"size= 27 type="password" class="champs_inscription" id="mdp" value="<?php echo htmlentities($_POST['mdp']);?>"placeholder="Mot de passe" /><span class="error"></span>
     
        <input name="email2"size= 27 type="text" class="champs_inscription" id="email2" value="<?php echo htmlentities($_POST['email2']);?>" placeholder="Comfirme ton adresse e-mail" /><span class="error"></span>
     <div align="center">   <input name="mdp2"size= 27 type="password" class="champs_inscription" id="mdp2" placeholder="Comfirme ton mot de passe" /><span class="error"></span>
     
    </div>
     
    	<div align="center"><input type="text"size=10 name="age"class="champs_inscription" id="age" placeholder ="Né(e) le" /><span class="error"></span>
    </div>
     
     
    </form>
     </div>
    <div class="texte">
    	 En cliquant sur Inscription,<br> tu acceptes nos   <a class=".zoombox_next zoombox w1100 h540 gallery " href="popup/boite3.php">conditions d'utilisation. </a><br />
       Tu recevras un e-mail qui valide ta pré-inscription. </div>
    </div>
     
    <div class="erreur_inscription">
    <?php
     
    if(isset($_POST['email2']))
    {
            $email = stripslashes(htmlentities($_POST['email2']));
            if(preg_match('#^(([a-z0-9!\#$%&\\\'*+/=?^_`{|}~-]+\.?)*[a-z0-9!\#$%&\\\'*+/=?^_`{|}~-]+)@(([a-z0-9-_]+\.?)*[a-z0-9-_]+)\.[a-z]{2,}$#i',str_replace('&amp;','&',$email))){
                  echo '';
             }else{
               echo 'Ton adresse e-mail est incorrecte.';}
       }else{      
    }
    echo '<br>';
    if( isset($_POST['envoi']) )	{
     
    require_once 'fonctions/formulaires.php';
     
    $_POST = form_secu($_POST, 'addslashes');
    $_POST = form_secu($_POST, 'htmlchars');
    $_POST = form_secu($_POST, 'trim');
     
    //// VERIFICATIONS BANALES ////
    if($_POST['mdp'] !== $_POST['mdp2'])
    	$erreur .=INSCRIPTION_ERREUR_PASS_IDENTIQUE ."<br />";
     
    if($_POST['email'] !== $_POST['email2'])
    	$erreur .=INSCRIPTION_ERREUR_EMAIL_IDENTIQUE ."<br />";
     
    if( strlen($erreur) > 5 )	{
    	echo $erreur ;
    	include_once 'bas.php';
    	exit;
    	}
    	connexion();
    //// VERIFICATIONS DES EXISTANCES ////
    $reponse_mail = @mysql_query("SELECT email FROM ". PREFIX ."membres WHERE email='". $_POST['email'] ."'") or die ('Erreur de vérification d\'e-mail déjà existant');	//verification si e-mail existe déjà
    $count_mail = @mysql_num_rows($reponse_mail);
    if($count_mail === 1)
    	$erreur .=INSCRIPTION_DEJA_EMAIL ."<br />";
     
     
    if( strlen($erreur) > 5 )	{
    	echo $erreur ;
    	exit;
     
    	}
     
    $alea = id_aleatoire();	//Création d'un identifiant aléatoire
     
    $passe = md5($_POST['mdp']);	//Encodage en md5 (c'est pas le plus sécurisé possible)
     
    if($environement_site == 1 AND $validation_site == 1)	$validation_site = 3;		//Si on est en local, ca revient à ce qu'il n'y ai aucune validation par mail.
    $validation = 0;
    if($validation_site == 3) $validation = 1;
     
    mysql_query("INSERT INTO ". PREFIX ."membres VALUES ('', '". $alea ."', '". $_POST['pseudo'] ."', '". $passe ."', '". $_POST['email'] ."', '". $_POST['age'] ."',  '". $_POST['hf'] ."', ". $validation .", ". MEMBRE .") ") or die ('Erreur d\'insertion dans la base de données');
     
    if($validation_site == 1)
     
    echo'<div class=inscription_ok> ';
    	echo'<span style="color:#CCFF33;">', INSCRIPTION_MESSAGE_FIN,'<br />
    	', INSCRIPTION_MESSAGE_FIN_VALIDATION_1, '</span> ';
    echo'<br />';
    if($validation_site == 1)
    	echo'<span style="color:#CCFF33">', INSCRIPTION_MESSAGE_FIN_VALIDATION_2,'.<br />';
    echo'</div> ';
    if($validation_site == 3)
    	echo'<span style="color:#CCFF33">', INSCRIPTION_MESSAGE_FIN, $nom_site ,'.<br />
    	', INSCRIPTION_MESSAGE_FIN_VALIDATION_3, '</span>';
     
    if($environement_site == 2)
    	{
    	if($validation_site == 1)
    		mail($_POST['email'], '['. $nom_site .']'.INSCRIPTION_TITRE, INSCRIPTION_MAIL_PARTIE_1. $nom_site .".
    
    $nom_site .".
    <img src=\"http://ysoral.free.fr/images/header-photo.jpg\" alt=\"logo\" />
    
    ". INSCRIPTION_MAIL_PARTIE_2 ."
    ". INSCRIPTION_PSEUDO ." : ". $_POST['pseudo'] ."
    ". INSCRIPTION_PASS ." : ". $_POST['mdp'] ."
    
    ". INSCRIPTION_MAIL_VALIDATION_1 ."
    ". $adresse_site ."validation_mail.php?id=". $alea ."
    
    
    ". INSCRIPTION_MAIL_FORMULES ."
    ". $nom_sit, "From: ". $nom_site ."<message automatique@". $nom_site .">");
     
    	if($validation_site == 3 OR $validation_site == 2)
    		mail($_POST['email'], '['. $nom_site .']'.INSCRIPTION_TITRE, INSCRIPTION_MAIL_PARTIE_1. $nom_site .".
    ". INSCRIPTION_MAIL_PARTIE_2 ."
    ". INSCRIPTION_PSEUDO ." : ". $_POST['pseudo'] ."
    ". INSCRIPTION_PASS ." : ". $_POST['mdp'] ."
    
    ________________________
    ". INSCRIPTION_MAIL_FORMULES ."
    ". $nom_site, "From: ". $nom_site ."<message automatique@". $nom_site .">");
    	}
     
    }	else	{
    ?>
    </div>
    <?php
    	}
    include_once 'bas.php';	//on affiche le bas (footer)
    ?>
    </div>

  17. #17
    Expert confirmé Avatar de papajoker
    Homme Profil pro
    Développeur Web
    Inscrit en
    Septembre 2013
    Messages
    2 104
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nièvre (Bourgogne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2013
    Messages : 2 104
    Points : 4 454
    Points
    4 454
    Par défaut
    quelle horreur !
    pourquoi ne pas faire l'effort de lire la documentation php sur les chaines ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     $nom_site .".
    $nom_site .".
    <img src=\"http://ysoral.free.fr/images/header-photo.jpg\" alt=\"logo\" />
    Ne risque pas de marcher, tu as déplacé l'erreur, bravo !
    $moi= ( !== ) ? : ;

  18. #18
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut
    ha oui erreur de ma par

    par contre l image ne s affiche pas jai le message comme ça donne la boite mail :

    Bonjour,

    Bienvenue sur wbe.
    <img src="http://ysoral.free.fr/images/header-photo.jpg" alt="logo" />






    Tu viens de faire une demande de pré-inscription
    Voici tes informations de connexion (à conserver) :
    Nom et prénom (identifiant) : fenixdragon
    Mot de passe : 111111

  19. #19
    Expert confirmé Avatar de papajoker
    Homme Profil pro
    Développeur Web
    Inscrit en
    Septembre 2013
    Messages
    2 104
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nièvre (Bourgogne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Septembre 2013
    Messages : 2 104
    Points : 4 454
    Points
    4 454
    Par défaut
    normal image est non affichée car il manque l'entete au mail, par defaud c'est du texte pas du html.
    http://php.net/manual/fr/function.mail.php

    Il faut envoyer le bon type mime
    $moi= ( !== ) ? : ;

  20. #20
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut
    Bonjour, tout et bon mais

    J'ai une petite question qui concerne les utilisateurs d'iphone

    Lorsqu'ils reçoivent le mail le contenu est vide.


    Merci de vos réponses.

    voici mon code:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
         //-----------------------------------------------
         //DECLARE LES VARIABLES
         //-----------------------------------------------
     
         $destinataire=$_POST['email'];
         $email_expediteur='BeeTease@ne_pas_repondre.fr';
         $email_reply='ne_pas_repondre@fai.fr';
     
    	$sujet=''. $nom_site .' '.INSCRIPTION_TITRE;
         $message_texte='Bonjour,'."\n\n".'Voici un message de pre-inscription'; 
         $message_html='
    	 <html>
    	 <head> </head>
    	 <body> 
    <table style=" padding-top: 0px; padding-right: 0px; padding-bottom: 35px; padding-left: 0px; width: 100%; background-position: 50% 0%; background-repeat: x-repeat;" border="0" cellspacing="0" cellpadding="0" align="center">
    <tbody>
    <td align="center">
    <a  href="http://www.beetease.com/">
    <table style=" background-image: url(http://www.beetease.com/mail/bannier_mail.jpg); 
    width: 599px; height: 142px; background-position: 50% 0%; 
    background-repeat: no-repeat no-repeat;" border="0" cellspacing="0" cellpadding="0" align="center">
     
    <td style="margin: 0; padding: 40px 0 0;
     background-image: url(http://www.beetease.com/mail/bannier_mail.jpg);background-repeat: no-repeat;
     background-position: top;"align="center" valign="top">
    </td>
     
    </tbody>
    </table>
    </a>
    <!-- header-->
     
     
    <table style=" padding-top: 0px; padding-right: 0px; padding-bottom: 35px; padding-left: 0px; width: 100%; background-position: 50% 0%; background-repeat: x-repeat;" border="0" cellspacing="0" cellpadding="0" align="center">
    <tbody>
    <td align="center">
    <a  href="http://www.indiegogo.com/">
    <table style=" background-image: url(http://www.beetease.com/mail/indiegogo_mail.png); 
    width: 599px; height: 60px; background-position: 50% 0%; 
    background-repeat: no-repeat no-repeat;" border="0" cellspacing="0" cellpadding="0" align="center">
     
    <td style="margin: 0; padding: 40px 0 0;
     background-image: url(http://www.beetease.com/mail/indiegogo_mail.png);background-repeat: no-repeat;
     background-position: top;"align="center" valign="top">
    </td>
     
    </tbody>
    </table>
    </a>
    <!-- header-->
     
    <table style="font-family:arial; width: 580px; letter-spacing: -0.4pt;" border="0" cellspacing="0" cellpadding="0" align="center">
    <tbody>
    <tr>
    <td >
    <p style="font-family:arial; color: #535353;  font-size: 17px;"><strong>Bonjour</strong>,
    <br>
    <br>
    <p style="font-family:arial; color: #333333;">Bienvenue sur <img src="http://www.beetease.com/mail/beetease.png" alt="Beetease">!</br>
    </br>
    Tu viens de faire une demande de pré-inscription.</br>
    Voici tes informations de connexion (à conserver):</br>
    Nom et prénom (identifiant):<span style="color:#00008b"> '.$_POST['pseudo'].'</span></br>
    Mot de passe:<span style="color:#00008b"> '. $_POST['mdp'].'</span></br>
    </br>
    Pour valider ta pré-inscription, tu dois maintenant cliquer sur le lien ci-dessous:</br>
    <span style="color:#00008b">'.$adresse_site ."validation_mail.php?id=". $alea .'</span>
    </br>
    Tu pourras alors découvrir un aperçu du fonctionnement de <img src="http://www.beetease.com/mail/beetease.png" alt="Beetease">.</br>
    </br>
    Nous souhaitons un réseau social avec de nouvelles interactions.</br>
    La vie est faite d\'imprévus et de rebondissements.</br>
    C\'est aussi la base de tout bon jeu.</br>
    <img src="http://www.beetease.com/mail/beetease.png" alt="Beetease"> est un réseau social créé en partant du principe que la vie est un jeu.</br>
    </br>
    Pour qu\'il puisse y avoir plus d\'imprévu, il est nécessaire de laisser plus de</br> place au libre arbitre.</br>
    Les nouvelles interactions sont des capacités et des privilèges qu\'on utilise</br> quand on le souhaite,un peu comme les cartes d\'un jeu de société.</br>
    </br>
    <img src="http://www.beetease.com/mail/beetease.png" alt="Beetease"> souhaite évoluer à l\'image de ses utilisateurs.</br>
    La première version sera celle pensée par notre équipe, un réseau social intégrant les capacités et les privilèges.</br>
    Puis l\'introduction d\'autres nouveautés se fera par vote des membres.</br>
    </br>
    Ta pré-inscription va te permettre de recevoir la newsletter*.</br>
    </br>
    <strong>L\'équipe </strong><img src="http://www.beetease.com/mail/beetease.png" alt="Beetease">.</p>
    <br>
    <br>
    <br>
    <div align="center"  >     <p> * Il est possible de se désabonner via un lien dans la première newsletter.</p>
    </td>
    </tr>
    </tbody>
    </table><!-- body -->
     
     
    	 </body>
         </html>';
     
         //-----------------------------------------------
         //GENERE LA FRONTIERE DU MAIL ENTRE TEXTE ET HTML
         //-----------------------------------------------
     
         $frontiere = '-----=' . md5(uniqid(mt_rand()));
     
         //-----------------------------------------------
         //HEADERS DU MAIL
         //-----------------------------------------------
     
         $headers = 'From: "" <'.$email_expediteur.'>'."\n";
         $headers .= 'Return-Path: <'.$email_reply.'>'."\n";
         $headers .= 'MIME-Version: 1.0'."\n";
         $headers .= 'Content-Type: multipart/alternative; boundary="'.$frontiere.'"';
     
         //-----------------------------------------------
         //MESSAGE TEXTE
         //-----------------------------------------------
         $message = 'This is a multi-part message in MIME format.'."\n\n";
     
         $message .= '--'.$frontiere."\n";
         $message .= 'Content-Type: text/plain; charset="iso-8859-1"'."\n";
         $message .= 'Content-Transfer-Encoding: 8bit'."\n\n";
         $message .= $message_texte."\n\n";
     
         //-----------------------------------------------
         //MESSAGE HTML
         //-----------------------------------------------
         $message .= '--'.$frontiere."\n";
         $message .= 'Content-Type: text/html; charset="iso-8859-1"'."\n";
         $message .= 'Content-Transfer-Encoding: 8bit'."\n\n";
         $message .= $message_html."\n\n";
     
         $message .= '--'.$frontiere."\n";
     
             if(mail($destinataire,$sujet,$message,$headers))
         {
     
         }
     
     
     
     
    }
    	}
     
    }	else	{
    ?>

Discussions similaires

  1. [XL-2010] Envoi mail auto avec image
    Par pitipilot dans le forum Macros et VBA Excel
    Réponses: 9
    Dernier message: 12/07/2013, 12h20
  2. Envoi de mail auto, fenetre alerte
    Par vanima dans le forum Outlook
    Réponses: 7
    Dernier message: 07/03/2008, 08h09
  3. Pdfcreator script envoi mail auto
    Par Nounours_39 dans le forum VB 6 et antérieur
    Réponses: 3
    Dernier message: 13/11/2007, 19h47
  4. Comment Envoyé un mail auto sans confirmation.
    Par Az3rTy dans le forum VB 6 et antérieur
    Réponses: 6
    Dernier message: 30/07/2006, 21h16
  5. [fusion avec word] fusion pour publipostage via le mail auto
    Par Christophe93250 dans le forum Access
    Réponses: 6
    Dernier message: 06/01/2006, 16h27

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo