Email to a list of address in your database.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a list of email address in a mysql database and I would like to
create a link that when clicked pulls up your my mail program and mails to
everyone in the database.

<a href="mailto:ARRAY OF EMAIL ADDRESS">Mail to everyone</a>

Here is my code:


<p><Br>
              <?  $userquery = "select * from users";
                  $myuserquery = mysql_query($userquery, $connection) or
die("Couldn't execute query.");
                  while($myresult = mysql_fetch_array($myuserquery)) {

			$emailAddress = $myresult['emailAddress'];

		      $to[] = "$emailAddress";

               }  $maxTo = count($to);
                  for($count = 0; $count < $maxTo; $count++) {

                  $mailTo = $to[$count];
			   }
            ?>
            <p><a href="mailto:<?=$mailTo;?>">mail To all my list</a>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux