oke, ik gebruik nu de phpmailer, alleen ik kom er niet uit hoe ik een bericht naar meerdere adressen kan sturen. Ik gebruik een while maar hoe doe je dat dan precies.
Ik heb onderstaande geprobeerd maar hij stuurt het alleen naar het 1e adres die in de database staat.
Ik heb onderstaande geprobeerd maar hij stuurt het alleen naar het 1e adres die in de database staat.
[COLOR= #0000BB]<?php
$usql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT `id`, `naam`, `email`, `bevestigd` FROM `abonnement` WHERE `bevestigd` = 1 "[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$usql[/COLOR][COLOR= #007700]))
{[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ufetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$usql[/COLOR][COLOR= #007700]))
{[/COLOR]
[COLOR= #FF8000]//[bla bla hoop andere dingen die nu niet van toepassing zijn, gaat om wat hieronder staat][/COLOR]
[COLOR= #0000BB]$mail[/COLOR][COLOR= #007700]->[/COLOR]AddAddress[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ufetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]);
}[/COLOR]
?>