Welcome to WebmasterWorld Guest from 54.144.68.27

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

trying to send multiple emails

help with php code to multiple emails

     

weddingm

4:35 pm on Jan 29, 2011 (gmt 0)

5+ Year Member



Hello all,

On the previous form I am pulling the vendor id. But then I need to get the emails from the db with the vendor id. However, I need to be able to send to all people who were previously selected.

Can you help in updating the code?

Thanks,
Matt

I hope this is enough snippet



$go_up=0;
$inputs="";
while($go_up<$num){
$go_up++;
$check_field_name="check".$go_up;
if(isset($_POST[$check_field_name])){
$value=$_POST[$check_field_name];

//display names:
$ex=explode("_toexplode_",$value);
$businessname=$ex[0];
$names.='<br>* '.$businessname;
$inputs.='<input type=hidden name='."$check_field_name".' value="'."$value".'" >';
}}

$go_up=0;
while($go_up<$num){
$go_up++;
$check_field_name="check".$go_up;
if(isset($_POST[$check_field_name])){
$value=$_POST[$check_field_name];
$value=explode("_toexplode_",$value);
$id=$value[1];

//read the email from db based on vendor id:
$sqlemail="SELECT * FROM sample WHERE dbid='$id' ";
$resultemail = @mysql_query( $sqlemail, $connection );
$rowemail = mysql_fetch_array($resultemail);
$businessemail= $rowemail['Username'];

$businessname=$value[0];
$to = $businessemail;

weddingm

12:51 am on Jan 30, 2011 (gmt 0)

5+ Year Member



sorry, figured it out...forgot to reconnect to the db after each one
 

Featured Threads

Hot Threads This Week

Hot Threads This Month