Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $db_server = "localhost";
- $db_username = "test";
- $db_password = "test123";
- $db_database = "send";
- $conn = new PDO("mysql:host=$db_server;dbname=$db_database", $db_username,
- $db_password);
- $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- $result = $conn->prepare("SELECT * FROM directors where email=?");
- $result->execute(array($_GET['email']));
- for($i=0; $row = $result->fetch(); $i++){
- $to = 'test@test.com';
- $subject = 'the subject';
- $message = 'hello';
- $headers = 'From: webmaster@example.com' . "rn" .
- 'Reply-To: webmaster@example.com' . "rn" .
- 'X-Mailer: PHP/' . phpversion();
- mail($to, $subject, $message, $headers);
- ?>
Add Comment
Please, Sign In to add comment