Forums

This topic is locked

Send Multiple check box value to the next page

Posted 15 Nov 2005 13:53:42
1
has voted
15 Nov 2005 13:53:42 Mashkur Alam posted:
Hi

Please anyone can show me a link of tutorial or any specific thread, where I can find "how can I send multiple check box value to the next page"

I am trying send multiple email addresses to the Next page selecting by CHECK BOX.

Here is a link of my page - www.docklandsrealestates.com/admin/client_list.asp

I will be really helpfull, if I can have something, I am really stuck in this position, cant go furthur.

Please help

Regards

Babu

Replies

Replied 21 Nov 2005 04:45:45
21 Nov 2005 04:45:45 Louis L replied:
You need to use an array, heres and example I use to update records hope it helps.

In the form:
<input name="checkboxArray" type="checkbox" value="checkboxArray-<%ID%>">

In the page the form posts to:
'Update checkbox
Set sql=Server.CreateObject("ADODB.Command"
sql.ActiveConnection = DataConn
checkboxArray = Request.Form("checkboxArray"
checkboxArray = Split(checkboxArray,","
MaxCounter = ubound(checkboxArray)

For i = 0 to MaxCounter
checkboxValue = Trim(checkboxArray(i))
ID = Replace(checkboxArray, "checkboxArray-", ""
checkboxValue = Request.Form("checkboxArray-" & ID))
sql.CommandText = "UPDATE table SET checkboxFieldName = " & checkboxValue & " WHERE (ID = " & ID & ";"

sql.Execute
Next

Reply to this topic