Ok, perhaps not the most eloquent of methods, but here's what I did (putting my
little knowledge of JavaScript to use!)...

sub loadmenu
 {
print <<LOADMENU;
      <body onLoad="javascript:document.form1.submit()">
      <form name=form1 action=menu.cgi method=post>
        <input type=hidden name=LOGIN_USERNAME value=$LOGIN_USERNAME>
        <input type=hidden name=USN value=$USN>
      </form>
      </body>
LOADMENU
exit;
 }

So basically, my 1st CGI prints this form to the user's browser and in the same
split second the Javascript does an "auto-submit" function so that the user
never knows that the form was displayed (it wasn't actually, the fields were
all hidden)...

Thanks for your input David & Troy...


David T-G wrote:

> Jim --
>
> ...and then Jim Lundeen said...
> %
> % Hello All,
>
> Hi!
>
> %
> % 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).
>
> Good enough.
>
> %
> % 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
>
> Right.  That would be ugly.
>
> % 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."
>
> I can never remember which is POST and which is GET, but just have your
> script pass the data over to MENU.CGI (are you on a Win machine, BTW, or
> do you ALWAYS SHOUT? ;-) in the environment as that-which-is-not-the-url
> method does.
>
> %
> % Any advice would be much appreciated!
>
> HTH & HAND
>
> %
> % Thanks!
> %
> % Jim
> %
>
> :-D
> --
> David T-G                      * It's easier to fight for one's principles
> (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
> (work) [EMAIL PROTECTED]
> http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
>
>   ------------------------------------------------------------------------
>    Part 1.2Type: application/pgp-signature

Reply via email to