ho fatto come hai detto tu, mi viene una cosa del genere.
Codice PHP:
<?php
$conn=mysql_connect("62.149.xxx.xxx", "Sqlxxx19", "767xxxxxx");
if (!$conn)
{
die("Connessione a Mysql non riuscita " . mysql_error());
}
$db=mysql_select_db("Sql386719_1", $conn);
if (!$db)
{
die("Connessione al Database non riuscita " . mysql_error());
}
?>
<?php
$Risultato=mysql_query("select * from iscrizione", $conn);
if (!$Risultato)
{
die("La tabella selezionata non esiste " . mysql_error());
}
while ($riga=mysql_fetch_array($Risultato))
{
"<div>" . $riga[4] . "</div><div>"
;
}
?>
<?php
// read the list of emails from the file.
$email_list = file("elist.txt");
// count how many emails there are.
$total_emails = count($email_list);
// go through the list and trim off the newline character.
for ($counter=0; $counter<$total_emails; $counter++) {
$email_list[$counter] = trim($email_list[$counter]);
}
// implode the list into a single variable, put commas in, apply as $to value.
$to = implode(",",$email_list);
$subject = "BOLLETTINO Angeli per un giorno";
$message = "<html>
<head>
</head>
<body>
<table border='0' align='center''>
<tr><td>[img]http://angelxxxxxx.it/newsletter/head.jpg[/img] </tr>
<tr><td>";
$message .= "
'<div>' . $riga[4] . '</div><div>'
";
$message .= "
</td>
</tr>
</table>
</body>
</html>";
$headers = 'From: [email]bollettino@angelxxxxxx.it[/email]' . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
if ( mail($to,$subject,$message,$headers) ) {
echo "The email has been sent!";
} else {
echo "The email has failed!";
}
?>
nell'e,ail che mi arriva si vede l'immagine ma poi dove in teoria si dovrebbero vedere i dati presi dal databse si vede questo:
'
' . . '
'