Jump to content

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:

 

email1@hotmail.com;email2@hotmail.com;email3@hotmail.com........

 

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.