how to handle two forms in cgi?

lli at sos.state.tx.us lli at sos.state.tx.us
Wed Nov 30 17:46:17 EST 2005


Hi Guys,

I am a new cgi programmer. Now I need to design a web application:
1. first, user login by their username and password in a form (login
form). When users click submit button it connect to database and check
user name and password in a table. If it match in a table, form1.py
should show second form for users in their browser. I have finish this
form. It works well.
2. second form (search form) which contain last name, and first name
which users input data. When user click submit button, it connect
database and search in a table. And the search result need to show in a
list or table in users' browser.

  My question is: How let these two form works together? I try to use
two codes for these two forms, e.g. Login.py for login form and
search.py for search form. But when user input data in search form and
click its submit button, it just comes back to login form. Second form
doesn't work.

Any help is appriciated!

Thanks,

LLI




More information about the Python-list mailing list