Jump to content

storing email addresses in a string...


jas4

Recommended Posts

Hi,

 

If i pull say 10 email addresses from a mysql database, how can I show them onto the page, in a form along other inputs (e.g. an email message) so there are inputs like $message and $from, and then post these form values to sendForm.php, collect them and send an email to each email address - individulaly?

 

My original idea was to send all the email addresses in a hidden field and collect them like this, but this obviously wont work becuase I'm sending other form data?

 

$postvars = array();

            foreach ($_POST as $interests => $value)
                  { 
                    $postvars[] = $value;
                    echo $value;
                   
                  }

 

any advice or tips??

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/68621-storing-email-addresses-in-a-string/
Share on other sites

haha no worries.

 

 

 

so at the other end all I need to do is:

 

$email = $_POST['emailto']

 

which will be a string like:

 

[email protected];[email protected];[email protected]........

 

so would I explode/implode $email into an array and then loop through it if i wanted to send an email to each address individually?

 

thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.