Copy link to clipboard
Copied
Hi,
I have two pages of coldfusion code, one page is how to display the form and another is the action code for the form. I want to create another page, so that if the user hits edit button, he is taken to page where the user see's the same form with prefilled entries for some fields and remaining fields are uneditable,i.e. they give the value in the database for the current entry as it is.
Should I access the values from the database, if yes, HOW? And if no, HOW?
Thanks,
vijayvijay77.
IF you had aready accessed the data on the preceding page, you could store the data in a persistant scope (I.E. session, application, server) where it can be used again on other pages without a return trip to the database.
IF you have not accessed the data yet, then passing in a key through either an GET (aka URL) or POST (aka FORM) variable allows easy access to a query to retreive the desired data from the database to populate the form.
BOTH of the use cases have good discusion with examples in
...Copy link to clipboard
Copied
IF you had aready accessed the data on the preceding page, you could store the data in a persistant scope (I.E. session, application, server) where it can be used again on other pages without a return trip to the database.
IF you have not accessed the data yet, then passing in a key through either an GET (aka URL) or POST (aka FORM) variable allows easy access to a query to retreive the desired data from the database to populate the form.
BOTH of the use cases have good discusion with examples in the ColdFusion Developer's Guide Documentation.
http://livedocs.adobe.com/coldfusion/8/htmldocs/Part_4_CF_DevGuide_1.html
Copy link to clipboard
Copied
Thanks so much for your reply, it was helpfull.
I really appreciate your help.
Vijayvijay77.