Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <?php
  2. $host = "twist3ddb2.db.7064184.hostedresource.com"; //db host
  3. $user = "twist3ddb2"; // username
  4. $pass = "Overkill01"; // password
  5. $acct_data = "twist3ddb2"; // account db
  6. $port = "";
  7. ?>
  8.  
  9. <?php
  10. $con = mysql_connect("$host","$user","$pass");
  11. if (!$con)
  12. {
  13. die('Could not connect: ' . mysql_error());
  14. }
  15. mysql_select_db("$acct_data", $con);
  16.  
  17. $result = mysql_query("SELECT name, confirmcode FROM tgusers");
  18.  
  19. while($row = mysql_fetch_array($result))
  20. if ($row['confirmcode'] == y)
  21. {
  22. continue;
  23. }
  24. else
  25. {
  26. $to = "email@server.com";
  27. $subject = "Confirmation Codes";
  28. $body = "Hello Twist3d Nova, Here are your confirmation codes for the following users. '.name.', '.confirmcode.'";
  29. if (mail($to, $subject, $body)) {
  30. echo("<p>Message successfully sent!</p>");
  31. } else {
  32. echo("<p>Message delivery failed...</p>");
  33. }
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement