To whoever can give me a hand lol,
I am developing a messaging script, and i want to have the ability to sent to many users. After the form is submitted, i split the string up into an array (which i have done) and then a copy of the message has to be written to the DB for each element in the array. Here is the code:
-----------------------------------------------------
<%
dim msgSentTo, msgSubject, msgBody, msgPriority, msgSentFrom, msgDate, msgRead, arSentTo(*,1)
dim userMID, strUserConn, strUserSQL
================SEND A MESSAGE================
userMID = Session("userID"
strUserSQL = "SELECT userName FROM tblUsers WHERE userID = " & userMID & ""
set strUserConn = Server.CreateObject("ADODB.RecordSet"
strUserConn.Open strUserSQL, "camel", 3, 3
userName = strUserConn("userName"
strUserConn.close
set strUserConn = nothing
msgSentTo = Request.Form("msgSentTo"
msgSubject = Request.Form("msgSubject"
msgBody = Request.Form("msgBody"
msgPriority = 2
if InStr("msgSubject","~~~"
then
msgPriority = 1
end if
msgSentFrom = userName
msgDate = time & " " & date
msgRead = False
arSentTo = Split(msgSentTo, ","
===[ THIS IS WHERE I GET STUCK]===
----------------------------------------------------
Any help would be greatly appriciated.
many thanks
a55m0nk
I am developing a messaging script, and i want to have the ability to sent to many users. After the form is submitted, i split the string up into an array (which i have done) and then a copy of the message has to be written to the DB for each element in the array. Here is the code:
-----------------------------------------------------
<%
dim msgSentTo, msgSubject, msgBody, msgPriority, msgSentFrom, msgDate, msgRead, arSentTo(*,1)
dim userMID, strUserConn, strUserSQL
================SEND A MESSAGE================
userMID = Session("userID"
strUserSQL = "SELECT userName FROM tblUsers WHERE userID = " & userMID & ""
set strUserConn = Server.CreateObject("ADODB.RecordSet"
strUserConn.Open strUserSQL, "camel", 3, 3
userName = strUserConn("userName"
strUserConn.close
set strUserConn = nothing
msgSentTo = Request.Form("msgSentTo"
msgSubject = Request.Form("msgSubject"
msgBody = Request.Form("msgBody"
msgPriority = 2
if InStr("msgSubject","~~~"
msgPriority = 1
end if
msgSentFrom = userName
msgDate = time & " " & date
msgRead = False
arSentTo = Split(msgSentTo, ","
===[ THIS IS WHERE I GET STUCK]===
----------------------------------------------------
Any help would be greatly appriciated.
many thanks
a55m0nk