Forum Moderators: open

Message Too Old, No Replies

Can you use dynamic data in a request form

Would save so much code!

         

bateman_ap

5:32 pm on Feb 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I am am trying to write some code to perform a INSERT in SQL table using a loop. What would be great is a way of dynamically enterting in data in a requaest.form

ie the final code should look something like:
if Request.Form("type1") = "1" then
where the 1 in type one is dynamic so the code would look something like
Request.Form("type" & Rs.("fld_type_id") & ") = "1" then

But not sure how to form this or whether it would work, anyone have any idea?

f00sion

10:53 pm on Feb 19, 2004 (gmt 0)

10+ Year Member



you've almost got it:

if Request.Form("type" & Rs.("fld_type_id")) = "1" then

mattglet

11:49 pm on Feb 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



f00sion, you didn't actually change anything, just the syntax, which both yours & bateman's should work anyway.

-Matt