Thanks so much for your feedback. I did some more reading on session
variables and built myself some practical examples to see how they
worked. I better appreciate your comment regarding only storing the userid
and not the password.
I was a little confused with your suggestion regarding HREF. I was able to
send a form with my hidden variables via the '<a HREF ="#"
onclick=..>Go</a>' string. If you meant something different I would
appreciate hearing more about it.
In any event I very much appreciated your spending time and effort helping
me. Thanks!
Laura
Subject: [html_code_clinic] RE: options for passing variables between forms
Date sent: Fri, 13 Dec 2002 09:08:56 +0800
From: "Rod McLeay" <r.mcleay@c...>
To: "HTML Code Clinic" <html_code_clinic@p...>
Send reply to: "HTML Code Clinic" <html_code_clinic@p...>
[ Double-click this line for list subscription options ]
Laura,
I would suggest session variables to store your login and password
info if it is entirely necessary to pass them throughout the site. I
think it is better to only store a userID or some other variable to
suggest the user is logged in unless you actually need the user login
password for reasons other than site access (I can't think of any off
hand).
Using hidden textboxes and passing with a form is not advisable for
passwords as they can be seen in the source code.
FORM POST is my preferred method of passing other variables as, like
you said, they are not visible in the address bar.
Links are fine with FORM POST just remove the HREF="" attribute and
replace with onclick="formName.submit()". You will also need to add a
style attribute style="cursor:hand" to turn the cursor into a hand
when the mouse is over it like a link does.
Rod
-----Original Message-----
From: Laura Moloney [mailto:lmoloney@t...]
Sent: Thursday, 12 December 2002 10:50 PM
To: HTML Code Clinic
Subject: [html_code_clinic] options for passing variables between
forms
As I understand it, you can pass information between forms in HTML
using HIDDEN INPUT fields with POST, as part of an HREF string, or as
cookies. I have done the first 2 options with success. However from
what I have seen/read, a) cookies are problematic in the event the
user has cookies set to disabled, b) using variables in the HREF
string makes those variables and their values visible to the user on
the address bar. Using HIDDEN INPUT fields sounds good, but I happen
to like using a link, rather than a POST submit button on certain
areas of my website.
So my question is: if I am passing userid/password as I move from form
to form how can I hide them, yet give me the option of using buttons
or links? Are session cookies my only option relative to having the
button or link flexibility.
Thanks in advance for your help!
Laura Moloney
Theradex
CN5257
Princeton, NJ 08543
(xxx) xxx-xxxx (Phone)
(xxx) xxx-xxxx (Fax)
LMOLONEY@T... (email)