[Zope] Re: passing variables

Steve Alexander steve@cat-box.net
Sun, 18 Jun 2000 10:30:33 +0100


josh on wrote:
> 
> Is there a way to pass variables from one page to another using an <a href>
> but not including them in the url after a ??
> 
> sorry, I know this is an html question, but I figured it was pretty zope
> related.

Josh,

This is a "zope@zope.org" question, not a "zope-dev@zope.org" question,
so I've moved the thread to there.


You can do what you want in a couple of ways:

1: Cookies

Can your HTTP clients use Cookies? You can send a cookie on one page and
retrieve it on the next. Look at the "Zope Developer's Guide" and for
information on Cookies and the RESPONSE variable.
Watch out though -- if you pass data in a cookie, and expect to use that
data retrieved later, you could be opening yourself up to a security
risk. A client could change the data in the cookie to mean something
different, and you might never find out.

2: Sessions

Use one of the NNNSession products, such as FSSession or SQLSession.
These use cookies behind the scenes, but present you with a nice
programming interface. Also, your actual data (session variable and so
forth) live on the server. The cookie just tells the server where to
find them. Thus, no part of your data is entrusted to the client.


I'd suggest you look at the FSSession product:

  http://www.zope.org/Members/gaaros/FSSession

Or perhaps HappySession:

  http://www.zope.org/Members/hungjunglu/Products/HappySession

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net