Setting session variables

Giganews Newsgroups
Subject: Setting session variables
Posted by:  Chuck Anderson (websiteaddre…@seemy.sig)
Date: Mon, 14 May 2007

Can session variables be set in a plain HTML file (e.g., with meta tags)?
(I've been looking, and I haven't found a way to do this, so I'm
guessing it is not possible. ??)

I am trying to control access to images on my web site by setting a
session variable on pages that contain <img> tags.  I have already
converted to using a php script in place of the image file name as the
src attribute to serve the images.  I'd like the Php script to verify
that a session variable has been set first.  The problem is that these
HTML files all predate my usage of Php, so they are all plain HTML
files.  That's why I am wondering if it is possible to set a session
variable in "plain" HTML (I'd like to avoid cookies as they can be denied).

I'm pretty sure that I can use an .htaccess file to redirect all HTML
files - in that directory - to a php script that sets a session var and
then redirects to the HTML file, but I wondered if there was a simpler
method that allows me to set session variables from within a plain HTML

Chuck Anderson • Boulder, CO