Jim Lundeen <[EMAIL PROTECTED]> wrote: > > I have 2 scripts. One accepts 3 values LOGIN_USERNAME, LOGIN_PASSWORD > and ACTION from an HTML form. That script looks in a user table in > MySQL to verify the user. If valid, it passes them to MENU.CGI with > LOGIN_USERNAME and a unique session number (USN). > > Here's the question: How to I "post" the LOGIN_USERNAME and USN to the > MENU.CGI script? I don't want the user "carrying" the info around in > the "Location" bar as "?USN=1234&LOGIN_USERNAME=somebody" -- I want it > to be part of the user's Perl process if you know what I mean, so that > if they hit RELOAD the values are still with them. Too, I don't want > someone trying to modify the info if it were in the "Location" bar, so > it needs to be a part of the "post." >
A widely-used approach is to give the user a 'session-id' and store all the data you want to associate with that 'session' someplace on the server. The two issues are then: 1) HTTP is stateless, so how do you identify the 'session-id' for each request? 2) CGI starts up a new *process* for each request, so how do you share the associated data? Solutions for both at: <http://www.stonehenge.com/merlyn/WebTechniques/col61.html> -- Steve perldoc -qa.j | perl -lpe '($_)=m("(.*)")' -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]