Hi All,
I am using CDONTS to create an email in HTML format to send from my ASP page. I have many forms. The first offers a number to the user. When they select a number the next form field (Name) loops the number of times of the number chosen. I pass the for loop throughout my forms.
In the email I am creating I want to loop through my list of names using a for loop. NOw I know that this for loop works but not in the particular string below... I am getting a "Syntax Error" error at 'For i'.
emailbody = " <table> " &_
" <tr> " &_
" <td colspan='2'><font size='2' face='Arial, Helvetica, sans-serif'>" &_
For i = 1 to request.form("ChooseNumber"
"Name: " & request.form("FirstName"&i) & request.form("LastName"&i) &" <br> " &_
next
" Company: " & request.form("Organisation1"
&" <br>" &_
" </font></td>" &_
" </tr>" &_
" </table> "
Any ideas would be great
EMG
I am using CDONTS to create an email in HTML format to send from my ASP page. I have many forms. The first offers a number to the user. When they select a number the next form field (Name) loops the number of times of the number chosen. I pass the for loop throughout my forms.
In the email I am creating I want to loop through my list of names using a for loop. NOw I know that this for loop works but not in the particular string below... I am getting a "Syntax Error" error at 'For i'.
emailbody = " <table> " &_
" <tr> " &_
" <td colspan='2'><font size='2' face='Arial, Helvetica, sans-serif'>" &_
For i = 1 to request.form("ChooseNumber"
"Name: " & request.form("FirstName"&i) & request.form("LastName"&i) &" <br> " &_
next
" Company: " & request.form("Organisation1"
" </font></td>" &_
" </tr>" &_
" </table> "
Any ideas would be great
EMG