Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Inviare valori array su corpo mail

    Ragazzi,sto sclerando. Come faccio ad inviare i valori dell 'array su corpo della mail?
    Codice PHP:
    $htmlContent '<html> <body><div class="c-form" style="width:600px;margin:0 auto;padding:30px 20px;border-radius:10px; border:1px solid #999;"> <center style="font:18px calibri;color:#333; background:#BAAC8F;margin:-30px -17px 0px -17px;"><img src="http://h-milano.it/images/hotelmilanologo.png" alt="logo" title="MyBrochure" style="width:160px; height:60px;"></center> <p style="font:14px calibri;color:#999999; font-family: sans-serif;"> <strong> Booking </strong></p>  <p style="font:14px/44px calibri;border-bottom: 1px solid #eee; margin: -14px 0 55px 37px; border-top:1px solid #eee;"><strong></strong></p> 
    <strong style="margin: 0 100px 0 30px;font-size:14px; font-family: sans-serif;"> Bambini: <strong style=" font-size:16px; color:#BAAC8F;">'
    .$bambini.'</strong>  <br>
    <strong style="margin: 0 100px 0 30px;font-size:14px; font-family: sans-serif;"> Eta: <strong style=" font-size:16px; color:#BAAC8F;">'
    .print_r($arreta).'</strong>  <br>
     <strong style="margin: 0 100px 0 30px;font-size:14px; font-family: sans-serif;"> Messaggio: <strong style=" font-size:16px; color:#BAAC8F;">'
    .$Cmessage.'</strong>  <br>  
     <p style="font:14px/44px calibri;border-bottom: 1px solid #eee;margin:50px 0 0 30px; border-top:1px solid #eee;"><strong></strong></p>  </div> </body></html>
    '

    $htmlcontent contiene il messaggio da inviare. Le variabili vengono passate tranquillamente.
    I valori dell array dovrebbero essere passati su $arreta solo che li non ho l opportunità di fare un for e stampare i valori. Ho fatto un for sul body della pagina ed i valori vengono passati tranquillamente.
    Il problema è mandarli via mail. Come faccio?

  2. #2
    Utente di HTML.it L'avatar di bstefano79
    Registrato dal
    Feb 2004
    Messaggi
    2,520
    perchè non puoi fare un ciclo???
    Codice PHP:
    $htmlContent '<html> <body><div class="c-form" style="width:600px;margin:0 auto;padding:30px 20px;border-radius:10px; border:1px solid #999;"> <center style="font:18px calibri;color:#333; background:#BAAC8F;margin:-30px -17px 0px -17px;"><img src="http://h-milano.it/images/hotelmilanologo.png" alt="logo" title="MyBrochure" style="width:160px; height:60px;"></center> <p style="font:14px calibri;color:#999999; font-family: sans-serif;"> <strong> Booking </strong></p>  <p style="font:14px/44px calibri;border-bottom: 1px solid #eee; margin: -14px 0 55px 37px; border-top:1px solid #eee;"><strong></strong></p> 
    <strong style="margin: 0 100px 0 30px;font-size:14px; font-family: sans-serif;"> Bambini: <strong style=" font-size:16px; color:#BAAC8F;">'
    .$bambini.'</strong>  <br>
    <strong style="margin: 0 100px 0 30px;font-size:14px; font-family: sans-serif;"> Eta: <strong style=" font-size:16px; color:#BAAC8F;">'
    ;

    ciclo for su $arreta 
    {
           
    $htmlContent + = 'quello che vuoi mettere';
    }

    $htmlContent +='</strong>  <br>
     <strong style="margin: 0 100px 0 30px;font-size:14px; font-family: sans-serif;"> Messaggio: <strong style=" font-size:16px; color:#BAAC8F;">'
    .$Cmessage.'</strong>  <br>  
     <p style="font:14px/44px calibri;border-bottom: 1px solid #eee;margin:50px 0 0 30px; border-top:1px solid #eee;"><strong></strong></p>  </div> </body></html>
    '


Tag per questa discussione

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.