Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //authentication for database
- $hostname = "localhost";
- $username = "admin";
- $password = "xxxxxx";
- //connection to the database
- $dbhandle = mysql_connect($hostname, $username, $password)
- or die("Unable to connect to MySQL");
- //select a database to work with
- $selected = mysql_select_db("notification",$dbhandle)
- or die("Could not select examples");
- //execute the SQL query and return records
- $result = mysql_query("SELECT * FROM tbl_lead WHERE pass_expiry >= DATE(NOW() + INTERVAL 1 DAY");
- //variable for email message
- $emailBody = "";
- $headers = 'From: Pass Validity Reminder' . "rn" .
- 'Reply-To: myemail@email.com' . "rn" .
- 'Cc: ccemail@Wemail. com' . "rn".
- 'X-Mailer: PHP/' . phpversion();
- $to = "myemail@email.com";
- //fetch tha data from the database
- while ($row = mysql_fetch_array($result))
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement