For index = 1 to (hvor mange select\'s der nu kan være .. f.eks. bare 9999) strItem = request(\"\" & index) if strItem = \"\" Then exit for response.write strItem next
If Request.ServerVariables(\"HTTP_METHOD\") = \"POST\" Then strFilename = Server.MapPath(Request(\"navn\") & Date & \".txt\") strContent = \"Hej \" & Request(\"navn\") & \",\" & vbCrLf & vbCrLF strContent = strContent & \"Du har bestilt følgende:\" & vbCrLf
For Each Item In Request.Form If Left(Item, 4) = \"sel_\" Then strContent = strContent & Request(Item) & vbCrLf Next
Set fso = Server.CreateObject(\"Scripting.FileSystemObject\") Set file = fso.OpenTextFile(strFilename, 2, True)
file.WriteLine strContent
file.Close: Set file = Nothing Set fso = Nothing
Response.Write replace(strcontent, vbcrlf, \"<br>\") Else %> <html> <head> <title>a-torsten</title> </head> <body> <form action=\"a-torsten.asp\" method=\"post\"> <input type=\"text\" name=\"navn\"> <p> <% for i=1 to 10 Response.Write \"<select name=\'sel_\" & i & \"\'>\"
for ii=1 to 10 Response.Write \"<option value=\'\" & ii & \"\'>Item #\" & ii & \"</option>\" next Response.Write \"</select><br>\" next %> <p> <input type=\"submit\" value=\"Send\"> </form> </body> </html> <% End If %>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.