[ic] Trying to figure out how to get custom forms into databases

Chris Chaney interchange-users@icdevgroup.org
Wed Sep 11 07:46:24 2002


How exactly does it work when a user fills out a form on an Interchange
page and submits it that it enters it into a database table.  How can I
set it up myself?

For example, lets say we have a user named John (ID) logged in and we
present him with a form.

Favorite color: blue, black, red, or yellow (favcol)
Favorite sport: soccer, basketball, American Football (favsport)
Age: ____ (age)

Now we have a special database table called surveys with

ID | favcol | favsport | age
------------------------------

What interchange code would we put into the form page to tell
interchange to put the submitted information into the 'surveys' table?

    <FORM ACTION="[process secure=0]" METHOD="POST" ....????

What tags would we use? What hidden variables would we use? Would we
name the form variables the same as the variables in the table?   We we
have to create a form processor (no idea how to do that) or could we set
this up in the page itself?  Lets say we we didn't want to input it into
a table if his age was older than 12.

Can someone help me figure this out?  This has been a major stumbling
block of mine and as of yet haven't figured it out.  Any help would be
greatly appreciated.

Thank you,

Chris