<?php
include 'DBconfig.php';
$date = date('d-M');
$select= "SELECT * FROM customer WHERE dob LIKE '%".$date."%'";
$query = mysqli_query($conn,$select);
echo "Today's Birthday:-";
while($fetch = mysqli_fetch_array($query))
{
$email=$fetch['email'];
$ip=$fetch['dob'];
$iparr = explode ("-", $ip);
$city = $iparr[0];
$city1 = $iparr[1];
echo "<br>Name:".$fetch['name']."<br>Email:".$fetch['email']."<br>";
if(isset($_GET['happybirthday']))
{
$to = $email;
$subject = "Universe Magazine";
$header="from:Universe Media";
$message ="Happy Birth Day \n\n\nName :Universe Media\nMobile No.: 9375050022\nEmail :universemedia123@gmail.com" ;
mail($to, $subject, $message, $header);
}
}
echo "<a href='home.php?happybirthday'>send</a>";
?>
这是生日快乐祝邮件... 如何在没有打开页面的情况下发送电子邮件