Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sql1 = "SELECT * FROM videos WHERE checked_out = '1'";
- $result1 = $dbLink->query($sql1);
- while($row1 = $result1->fetch_assoc()) {
- $name = $row1['name'];
- $tape_no = $row1['tape_no'];
- $member_name = $row1['member_name'];
- $date_out = date("F j, Y", strtotime($row1['date_out']));
- }
- //email function to administrator
- $to = "nouser@mail.com";
- $subject = "Daily Video Rental Summary";
- $message = "$name $tape_no $date_out $member_name
- ======================================================================
- PLEASE DO NOT REPLY TO THIS MESSAGE, AS THIS MAILBOX IS NOT MONITORED
- ======================================================================";
- $from = "no_replies_please@mail.com";
- $headers = "From:" . $from;
- mail($to,$subject,$message,$headers);
- $sql1 = "SELECT * FROM videos WHERE checked_out = '1'";
- $result1 = $dbLink - > query($sql1);
- while ($row1 = $result1 - > fetch_assoc()) {
- $name = $row1['name'];
- $tape_no = $row1['tape_no'];
- $member_name = $row1['member_name'];
- $date_out = date("F j, Y", strtotime($row1['date_out']));
- //email function to administrator
- $to = "nouser@mail.com";
- $subject = "Daily Video Rental Summary";
- $message = "$name $tape_no $date_out $member_name
- ======================================================================
- PLEASE DO NOT REPLY TO THIS MESSAGE, AS THIS MAILBOX IS NOT MONITORED
- ======================================================================";
- $from = "no_replies_please@mail.com";
- $headers = "From:".$from;
- mail($to, $subject, $message, $headers);
- }
- $sql1 = "SELECT * FROM videos WHERE checked_out = '1'";
- $result1 = $dbLink->query($sql1);
- while($row1 = $result1->fetch_assoc()) {
- $name = $row1['name'];
- $tape_no = $row1['tape_no'];
- $member_name = $row1['member_name'];
- $date_out = date("F j, Y", strtotime($row1['date_out']));
- $message .= "$name $tape_no $date_out $member_name"
- }
- //email function to administrator
- $to = "nouser@mail.com";
- $subject = "Daily Video Rental Summary";
- ======================================================================
- PLEASE DO NOT REPLY TO THIS MESSAGE, AS THIS MAILBOX IS NOT MONITORED
- ======================================================================";
- $from = "no_replies_please@mail.com";
- $headers = "From:" . $from;
- mail($to,$subject,$message,$headers);
- $message = '';
- while($row1 = $result1->fetch_assoc()) {
- $message .= $row1[...]; // whatever you need
- }
- $message = NULL;
- $sql1 = "SELECT * FROM videos WHERE checked_out = '1'";
- $result1 = $dbLink->query($sql1);
- while($row1 = $result1->fetch_assoc()) {
- $name = $row1['name'];
- $tape_no = $row1['tape_no'];
- $member_name = $row1['member_name'];
- $date_out = date("F j, Y", strtotime($row1['date_out']));
- $message .= "$name $tape_no $date_out $member_name" }
- while($row1 = $result1->fetch_assoc()) {
- //assign vars here
- $message .= "$name $tape_no $date_out $member_namen";
- }
- $message = "$message
- ======================================================================
- PLEASE DO NOT REPLY TO THIS MESSAGE, AS THIS MAILBOX IS NOT MONITORED
- ======================================================================";
- //assign other variables
- //mail()
Add Comment
Please, Sign In to add comment