Hey guys we want to make a lava code where it wish a member happy birthday via email
ive already added some codes together but dnt know if its right anyone can help me complete it please
ive already added some codes together but dnt know if its right anyone can help me complete it please
Code:
$tolog = true; { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users where month(`birthday`) = month(curdate()) and dayofmonth(`birthday`) = dayofmonth(curdate());")); if($noi[0]!=0){ $sql = mysql_fetch_array(mysql_query("SELECT id, name, birthday FROM ibwf_users where month(`birthday`) = month(curdate()) and dayofmonth(`birthday`) = dayofmonth(curdate()) ORDER BY RAND() LIMIT 1")); $uage = getage($sql[2]); $lnk = "<hr />Happy Birthday<br/><a href=\"index.php?action=viewuser&who=$sql[0]\">$sql[1]</a>"; echo "$lnk<br/>Hope U have A Wonderful Day<br/>"; } } if($tolog) { $msg = "\n Happy Birthday: ".$uid." \n http://lava-codings.uk.to Wish u a happy Birthday and tanx for being our member \n\n Thank You\n dnt forget to come and say hey"; $subj = "Whises from lava-codings.uk.to"; $headers = 'From: noemail@lava-codings.uk.to' . "\r\n" . 'Reply-To: noreply@lava-codings.uk.to' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($email, $subj, $msg, $headers); echo "<a href=\"login.php?loguid=$uid&logpwd=$pwd\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Login</a>"; }
Comment