| trying to send multiple emails help with php code to multiple emails |
weddingm

msg:4259930 | 4:35 pm on Jan 29, 2011 (gmt 0) | 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

msg:4260069 | 12:51 am on Jan 30, 2011 (gmt 0) | sorry, figured it out...forgot to reconnect to the db after each one
|
|
|