On 10/10/00 11:33 AM, "Yvonne Totty" <[EMAIL PROTECTED]> wrote:

> HI!
> I am having a slight newbie problem and for the life
> of me cannot find any references for how to do it.
> I have input boxes on a page. I want the information
> from that box to be input into a database table upon
> clicking the Submit button.
> I cannot figure out how to get that information from
> point 'A' to point 'B'.

Assuming your form has a field named the same as all of columns you want to
insert (i.e. Foo, bar, whatever)... Then you can have it post to another
method that has a line like this in it:

    <dtml-call name="sqlInsertValues">

And then have a SQLMethod called 'sqlInsertValues' that has a body like

    INSERT INTO mytable (
        column3 ) VALUES (
        <dtml-sqlvar name="column1" type=string>,
        <dtml-sqlvar name="column2" type=int>,
        <dtml-sqlvar name="column3" type=string> )

Remember to put these in the arguments list, or they won't be caught from
the REQUEST namespace.


| Christopher Petrilli                                     Digital Creations
| [EMAIL PROTECTED]                                Where Zope comes from

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to