Hello i dont know how to put this together or i dont even know if you would understand me completly, any way here is a try.
What i am doing is i have feild names in a database
| id | feildtitle |
---------------------
|1 | Name: | <<<<table1
|2 | Tel No |
next in my cfm i do select * from TableOfFeilds
Then;
<cfloop from =1 to=# recordcount# index = "counter">
<cfoutput datasource maxrow=1 startrow=counter>
#f# : <input type=text name = feild#counter# ><input type=hidden name=questionid#counter# value=table1.id>
</cfoutput></cfloop>
and on submit of this it will forward to an update.cfm
so there i want to
<cfloop from=1 to=recordcount index = counter>
<cfquery datasource >
insert into table2 (ans, questionid) values (feild#counter#, questionid#counter#);</cfq
uery>
Structure of table to
| id2 | questionid | ans |
--------------------------
----
| 1 | 1 | myname |
| 2 | 2 | MyTele |
do things look good ?
well not really if you look to the update page its all messed up the variables arent actually variables
the table 2 would be more like this
| id2 | questionid | ans |
--------------------------
----
| 1 | question1 | feild1|
| 2 | question2 | feild2|
which where supposed to be the dynamic variable names
can some one helpme with me awfull logic + codding ?
PS. my codding aint that bad .. its just becouse its easier for a newbie to understand ... i never under-estimate any one.
Thanks in Advance
Ramzi chekkath
Start Free Trial