Mail-html og hent oplysninger fra databasen?
Jeg har et stort problem!Jeg skal lave et nyhedsbrev som skal hente nogle oplysninger fra databasen i nogle forskællige tables.
jeg skal bruge noget fra news og fra cups osv.
men hvordan får jeg den til at sætte oplysningerne ind i html delen af mail()
her er min kode!
men hvordan henter jeg fra databasen flere stæder i den smøre?
$message = '
<html>
<head>
<title>'.$_POST['headline'].'</title>
</head>
<body bgcolor="#CCCCCC">
<center>
<div style="background-color:#cccccc;border:1px black solid;width:800px;margin:4px;">
<p align="right"><img src="www.improved-gaming.dk/images/newsletter_head.jpg" width="800" height="238" /></p>
<p align="right" style="font-family:Times New Roman, Times, serif;color:#333333;">'.date("j. F Y").'</p>
<p align="left" style="font-family:Times New Roman, Times, serif;color:#333333;font-size:24px">
<strong>Nyhedsbrev</strong><font size="3"> fra improved-gaming</font>
</p>
<p align="left" style="font-family:Times New Roman, Times, serif;color:#333333;font-size:12px">'.$_POST['firstline'].'</p>
<p align="left" style="font-family:Times New Roman, Times, serif;color:#333333;font-size:12px">'.$_POST['text'].'</p>
<p align="left" style="font-family:Times New Roman, Times, serif;color:#333333;font-size:14px;"><strong style="font-size:18px">Næste cup</strong><br />
'.$nrow->name.'<br />'.$nrow->prizes.'
</p>
<p align="left" style="font-family:Times New Roman, Times, serif;color:#333333;font-size:14px"><strong style="font-size:18px">Nyheder</strong><br />
<font size="3">nyheder</font></p>
<p align="left" style="font-family:Times New Roman, Times, serif;color:#333333;font-size:14px"><strong style="font-size:18px">Reklame</strong><br />
<font size="3">'.$_POST['reklame'].'</font></p>
<p align="left" style="font-family:Times New Roman, Times, serif;color:#333333;font-size:14px"><strong style="font-size:18px">Fra shoppen</strong><br />
<font size="3">'.$_POST['shop'].'</font></p>
</div>
</center>
</body>
</html>
';
