473,388 Members | 1,399 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

passing values from one form to another

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..

Nov 22 '05 #1
2 2084
ei***********@yahoo.com wrote:
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
Nov 22 '05 #2
ei***********@yahoo.com writes:
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
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
2
by: Gordon Hudson | last post by:
Hello Here is what I am trying to do: Make a hyperlink on a data entry form with its URL built from the values for fields in that entry on the database. So, I would go to record 65785 click...
4
by: Ron Rohrssen | last post by:
I want to show a dialog and when the form (dialog) is closed, return to the calling form. The calling form should then be able to pass the child form to another object with the form as a...
8
by: Johnny | last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form (fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip code. The user can enter a zip code in the text box and...
1
by: Iyigun Cevik | last post by:
I'm passing my form to another page by using Server.Transfer method. I wrote readonly properties for each textbox in the first page, and i'm getting values of these textboxes from second page from...
2
by: Mani P.S via .NET 247 | last post by:
(Type your message here) Hi I'm new to asp.net and I need some help I have three forms with some textboxes.I want to pass the values of the textboxes of form1 and form2 to the third form For this...
8
by: Chris | last post by:
Hi, I have two froms (form1 and form2). I want to be able to pass values from form 1 to form2 and be able to use those values leter in form2. This is my code for form1 Private Sub...
13
by: Deano | last post by:
Apparently you can only do this with one value i.e Call MyAssetLocationZoom(Me!txtLocation, "Amend data") This runs; Public Sub MyAssetLocationZoom(ctl As Control, formName As String) On...
5
by: jmartmem | last post by:
Greetings, I have built an Update Record Form in an ASP page. This form contains a number of fields, such as text boxes and menus, to name a few. Upon clicking the 'submit' button, I want the...
3
by: DaveTWS | last post by:
I am making the switch from C++ to C#, and struggling as I cannot use pointers! I have a form (A) into which the user types some data. Depending upon the data entered Form A may then call another...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.