close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How to send to all in a dept or depts using checkboxes

Thread began 9/11/2009 11:58 am by Daryl | Last modified 9/15/2009 3:24 pm by Daryl | 6279 views | 12 replies

DarylBeta Tester

Originally Said By: Jason Byrnes
  The to address can be a comma separated list.

If you create a collection of checkboxes all named "email" and set the value to the email address:
<input type="checkbox" name="email[]" value="dept1@dmain.com" id="email_0" />
<input type="checkbox" name="email[]" value="dept2@domain.com" id="email_1" />
<input type="checkbox" name="email[]" value="dept3@dmain.com" id="email_2" />
<input type="checkbox" name="email[]" value="dept4@domain.com" id="email_3" />

You can set the top address to use the email form element and implode() the array to a comma separated list:
<?php echo ((isset($_POST["email"]))?implode(", ",$_POST["email"]):""); ?>  



Forget all my other posts after the one from Jason. I now realise I have just been confusing myself!

I understand what Jason has suggested, but from what I understand each checkbox would have one email address. What I am looking for is for each checkbox value to hold all email addresses for that department which is retrieved from my database.

Would I just put some sort of while statement in each value? I have tried to research arrays to see if that would help and I think that is what has gotten me so confused.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...