passing values from one form to another

E

eight02645999

hi

i have 3 python cgi scripts created, one is a login page(login.py),
another is the main page(main.py) with a lot of user inputs and the
last one is a python cgi script results.py to process main.py

In main.py, i am able to check for the value of the user and password
field, eg

if form.has_key("user") and form["button"].value == "Login" and
form.has_key("password"):
# show all fields

how can i also check for the user field in the results.py script? ie ,
pass the value of the "user" to the python script..so that user must
always login to get to results.py....

thanks..
 
D

Diez B. Roggisch

hi

i have 3 python cgi scripts created, one is a login page(login.py),
another is the main page(main.py) with a lot of user inputs and the
last one is a python cgi script results.py to process main.py

In main.py, i am able to check for the value of the user and password
field, eg

if form.has_key("user") and form["button"].value == "Login" and
form.has_key("password"):
# show all fields

how can i also check for the user field in the results.py script? ie ,
pass the value of the "user" to the python script..so that user must
always login to get to results.py....

Use a session. Or pass the values as hidden form-fields, which gets
pretty tedious.

Diez
 
M

Mike Meyer

In main.py, i am able to check for the value of the user and password
field, eg

if form.has_key("user") and form["button"].value == "Login" and
form.has_key("password"):
# show all fields

how can i also check for the user field in the results.py script? ie ,
pass the value of the "user" to the python script..so that user must
always login to get to results.py....

This isn't really a Python question. The canonical solution is to set
a cookie to get the browser to pass the required information to the
next form.

<mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top