Advertisement

06.19.2005 at 04:20AM PDT, ID: 21463179
[x]
Attachment Details

Beilding feilds dynamicaly

Asked by rchekath in ColdFusion Application Server

Tags: beilding

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#);</cfquery>


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
[+][-]06.19.2005 at 07:46AM PDT, ID: 14251950

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.20.2005 at 05:31AM PDT, ID: 14256053

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.20.2005 at 08:35AM PDT, ID: 14257651

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: ColdFusion Application Server
Tags: beilding
Sign Up Now!
Solution Provided By: mrichmon
Participating Experts: 2
Solution Grade: B
 
 
[+][-]06.20.2005 at 01:23PM PDT, ID: 14260295

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.20.2005 at 03:01PM PDT, ID: 14261149

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.21.2005 at 10:27AM PDT, ID: 14268248

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32