View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Pointer in the right direction required

Thread began 9/11/2009 9:30 am by John Langer | Last modified 9/14/2009 3:02 pm by John Langer | 1928 views | 6 replies

Jason ByrnesWebAssist

Create a recordset to pull all of the records from the people table.

We will need to have at least the peopleID and email address.


Add two multi select lists to your page, the first one will be set to be dynamic and use the people recordset. Set the label to the email address and the value to the peopleID column.

name the second select list "people[]"

You will then add a button to the form, not be submit buttons, just standard button:
<input name="button" type="button" id="button">


Select it in design view, and on the Behaviors panel, use the Dynamic Dropdowns Add Value From Source List to Target List behavior.

Also add a submit button to the page.



This will have a select list that gives you the ability to chose the people you want and add them tho the people select list. Since the name of the people select list is "people[]" it will create an array of all of the selections.

assuming you are storing the mailingListID value in a hidden form element named mailingListID, you would need to hand code the insert record behavior to loop through the array, something like:

php:
<?php

if(isset($_POST["people"]) && is_array($_POST["people"])) {
  
$count count($_POST["people"]);
  for(
$i 0$i $count$i++) {
    
$sql "INSERT INTO listMember (MailingListID, peopleID) VALUES(".$_POST["mailingListID"].", ".$_POST["people"][$i].")";
    
mysql_select_db($database_localhost$localhost);
      
$Result1 mysql_query($sql$localhost) or die(mysql_error());
  }
}
?>

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