Forums
This topic is locked
Whats wrong 3rd post no solution
Posted 13 Apr 2002 15:47:00
1
has voted
13 Apr 2002 15:47:00 scre wdanger posted:
Hi,sad but true its my 3rd post and the problem remains unaunswered.
Does anybody knows a good tutorial on dynamic checkboxes?
I have a list of members and an option to send all the members a mail. What i wanna do is to add the dynamic checkboxes so that one may choose the desired members to whom they want to send a mail.(like in hotmail etc).
Any help ???
Replies
Replied 15 Apr 2002 22:58:58
15 Apr 2002 22:58:58 David Behan replied:
This might help you...
Response.Buffer=1
Dim strID,rsEmail,sql
strID=Request("delete_id"
if strID <> "" then
Set rsEmail= Server.CreateObject("ADODB.Recordset"
rsEmail.ActiveConnection = MM_connection_STRING
sql="SELECT * FROM tbl_email WHERE email_id IN "
sql=sql &"(" & strID & ""
rsEmail.Source = sql
rsEmail.LockType = 3
rsEmail.open()
%>
<%
Do While rsEmail.EOF=False
strSender = Request.Form("from"
strFirstName = rsEmail.Fields.Item("first_name".Value
strSubject = Request.Form("subject"
strEmail = rsSubscribers.Fields.Item("email_address".Value
strHeader = Request.Form("header"
strMainBody = Request.Form("body"
strFooter = Request.Form("footer"
strImportance = Request.form ("importance"
Dim strBody
strBody = strBody & strHeader & vbCrLf & vbCrLf & vbCrLf
strBody = strBody & "Dear " & strFirstName & vbCrLf & vbCrLf
strBody = strBody & strMainBody & vbCrLf & vbCrLf
strBody = strBody & strFooter & vbCrLf
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail"
objCDO.To = strEmail
objCDO.From = strSender
objCDO.Cc = ""
objCDO.Bcc = ""
objCDO.Subject = strSubject
objCDO.Body = strBody
objCDO.Importance = strImportance
objCDO.Send
Set objCDO = Nothing
rsEmail.MoveNext
Loop
rsEmail.Close
Set rsEmail=Nothing
Response.Redirect ("email_list.asp?email=ok)
else Response.redirect("email_list.asp?email=none)
end if
%>
You could use this script where by you type the email and then select the users you want to send it too from a list below. All details would be in the one form. Try it and see...
_________________________
David Behan - www.bmor.com
Edited by - beano on 15 Apr 2002 23:03:04
Response.Buffer=1
Dim strID,rsEmail,sql
strID=Request("delete_id"
if strID <> "" then
Set rsEmail= Server.CreateObject("ADODB.Recordset"
rsEmail.ActiveConnection = MM_connection_STRING
sql="SELECT * FROM tbl_email WHERE email_id IN "
sql=sql &"(" & strID & ""
rsEmail.Source = sql
rsEmail.LockType = 3
rsEmail.open()
%>
<%
Do While rsEmail.EOF=False
strSender = Request.Form("from"
strFirstName = rsEmail.Fields.Item("first_name".Value
strSubject = Request.Form("subject"
strEmail = rsSubscribers.Fields.Item("email_address".Value
strHeader = Request.Form("header"
strMainBody = Request.Form("body"
strFooter = Request.Form("footer"
strImportance = Request.form ("importance"
Dim strBody
strBody = strBody & strHeader & vbCrLf & vbCrLf & vbCrLf
strBody = strBody & "Dear " & strFirstName & vbCrLf & vbCrLf
strBody = strBody & strMainBody & vbCrLf & vbCrLf
strBody = strBody & strFooter & vbCrLf
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail"
objCDO.To = strEmail
objCDO.From = strSender
objCDO.Cc = ""
objCDO.Bcc = ""
objCDO.Subject = strSubject
objCDO.Body = strBody
objCDO.Importance = strImportance
objCDO.Send
Set objCDO = Nothing
rsEmail.MoveNext
Loop
rsEmail.Close
Set rsEmail=Nothing
Response.Redirect ("email_list.asp?email=ok)
else Response.redirect("email_list.asp?email=none)
end if
%>
You could use this script where by you type the email and then select the users you want to send it too from a list below. All details would be in the one form. Try it and see...
_________________________
David Behan - www.bmor.com
Edited by - beano on 15 Apr 2002 23:03:04
Replied 24 Apr 2002 04:55:04
24 Apr 2002 04:55:04 scre wdanger replied:
Sorry bro,
A little more explanation might help me solve my problem. What about the checkboxes??
How to relate the above written script with it?
Thanx anyway
A little more explanation might help me solve my problem. What about the checkboxes??
How to relate the above written script with it?
Thanx anyway