Quote:
|
quote:Hi Imar - wow! quick response on that one.
|
Depends on the time of the day you post your question.... ;)
Anyway, try this simple example; this may just be what you need.
Imar
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
If Request.Form("lstCategory") <> "" Then
Dim category
For Each category In Request.Form("lstCategory")
Response.Write("INSERT INTO SomeTable (SomeColumn, TheCategory) VALUES('SomeValue', " & category & ")<br />")
Next
End If
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test Loop Insert</title>
</head>
<body>
<form method="post" action="PutTheBoxInTheFreezer.asp">
<select name="lstCategory" multiple="multiple" size="5" style="width: 75px;">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<input type="submit" value="Click me" />
</form>
</body>
</html>
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.