Wat doe ik fout?
<?php
mysql_connect("localhost","root","usbw");
mysql_select_db("verjaardag") or die ("Niet gelukt");
$datum = date('d-m');
$result = mysql_query("SELECT * FROM kalender WHERE gbdatum = '$datum'");
if( mysql_num_rows( $result ) != 0 )
{
while ( $list = mysql_fetch_array($result))
{
$leeftijd = date('Y') - $list['gbjaar'];
echo 'Vandaag is <b>'.$list['naam'].' '.$list['achternaam'].'</b> jarig, Hartelijk gefeliciteerd<br>';
$to = '[email protected]'; // The email address you want notifiactaions sent to
$subject = 'Bezoekers ip'; // What do you want the subject line of notifications to be?
// PHP Script By Dave Lauderdale
// Published at: www.digi-dl.com
$visitorSpecs =
"<hr size=2 width=300 align=left>".
"<b>Visitor IP address:</b> ".$_SERVER['REMOTE_ADDR'].
"<br>".
"<b>Visitor system specs:</b> ".$_SERVER['HTTP_USER_AGENT'].
"<br>";
$headers = "Content-type: text/html \nFrom: [email protected]";
$body = "<body>
<br>
<table cellspacing=1 cellpadding=2 align=center>
<tr>
<td>
<b><font face=arial size=2>Website visitors IP address and system specs:</font></b>
</td></tr>
<tr><td><font face=arial size=2> $list['naam'] </font></td><tr>
<tr>
<td>
<font face=arial size=2> ".$visitorSpecs." </font>
</td></tr></table>
</body>";
mail($to,$subject,$body,$headers);
}
}
else
{
echo 'Vandaag is niemand jarig';
}
?>