Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Multiple People Form Data, w/ Checkboxes

Status
Not open for further replies.

jmiller79

Programmer
Jul 13, 2004
48
US
I need a way to send the data in a form to multiple emails, by way of checkboxes, I want to have a list of people with checkboxes next to there names and if there name is check off they will receive that form data.. anyone have a way of doing this. I can send email. That is not a problem, it is just multiple what is the problem. Thanks

.ASP
 
Consider these checkbox:

<input type="checkbox" name="Fred">
<input type="checkbox" name="Steve">


On the page that processes your form:

If Len(Request("Fred")) > 0) Then
'Add Fred to your email recipients list
End if

If Len(Request("Steve")) > 0) Then
'Add Steve to your email recipients list
End if

and so on...
 
i was think you have the list - listed dynamically from a db, you could give text a value of the persons id ex.

<input type="checkbox" name="1">
<input type="checkbox" name="2">

on other page your sql will be something like

strChecked = "" + Request.Form(checkbox) + ""

sql="select * FROM tblname WHERE Id IN (" & strChecked & ")
 
Populated form my DB, when I hit submit on the form it show the email addresses I selected but, they are all the same url name. All say “email=jmiller@abc.com&email=rick@abc.com" How can I get them to add a number next to the label email. so like this : email1=jmiller@abc.com&email2=rick@abc.com"
again my list is genrated from my DB

Thanks
 
assuming you use a loop to populate your list, you can just add a counter before you enter the loop and increment it each time through the loop while appending the count to the label name.

something like:

Code:
count = 1
looping through list
    <input name="email" & count & "" blah blah>
    count = count + 1
end loop

that's just the idea...not true code obviously.
 
do it like this if you are going to use my example

lets say u are using the getrows method to retreive records

you do something like

for i= lbound(arr,2) to ubound(arr,2)
response.write "<input name=""emailid"" type=""checkbox"" value="""&arr(0,i)&""">"
next

the checkbox needs to have the same name

then on other page do

strChecked = "" + Request.Form(emailid) + ""

sql="select * FROM tblname WHERE Id IN (" & strChecked & ")"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top