Forum Moderators: open

Message Too Old, No Replies

Dymanic Collection of Data

         

ukgimp

11:59 am on Aug 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I pass variable from one for to another (count) and a lod of for data. The form data is name sequentially. eg

Response.Write"<input type='text' name='title"& i &"'' size='40'>"

Then I wish to collect the data

I have tried all sorts, but this is bugging me
it seems close

dim title
For i = 1 To NumberItems
title = Request.Form("title"""& i &"")
Response.Write(title)
Response.Write("<hr>")
Next

using the following works but it does not loop, so i know the vars ar passing

title = Request.Form("title1")

This would be quite easy in php. :(

Cheers

Dreamquick

12:26 pm on Aug 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try changing;

Request.Form("title"""& i &"")

...to...

Request.Form("title" & i)

...that should help a little as you had an extra quote in the variable name.

- Tony

ukgimp

1:07 pm on Aug 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you are indeed a star

So simple. i wont be forgetting that one. Trouble is I dont now when i will need it again :)