how to handle two forms in cgi?

lli at lli at
Wed Nov 30 23:46:17 CET 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,
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. for login form and 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!



More information about the Python-list mailing list