Forum Moderators: phranque

Message Too Old, No Replies

Cookies and SSI

Need to customize and track SSI content

         

runner

3:58 pm on Nov 13, 2004 (gmt 0)

10+ Year Member



All the web pages on my site contain two SSI includes. One of the SSI include areas is for the main body of the web page... "About Us" "Contact Us" "News" "Events" etc. Pretty basic stuff.

The other SSI include is a small tables-based calendar. On the initial visit to my site I want the current month's calendar to be loaded via an SSI include. The visitor has the ability to change to a different month's calendar. I want to use cookies to keep track of which month's calendar is currently loaded.

I want the visitor to be able to select a calendar month and have it NOT CHANGE as they browse around in my site. The only time I want the calendar to change is if the visitor himself selects different month.

I don't know much about cookies but I've done a lot of reading in the last day and I know a cookie can be set using java script or cgi script via SSI. I don't know the details of how to do it yet. I also don't know how to set up an SSI include that pushes out the correct include file based on an existing cookie setting.

So... with my limited knowlege I at least know:

1) I have to have a mechanism to set a cookie that will tell me what calendar the visitor currently has loaded.

2) I need to find a mechanism to look at the cookie on each web request and provide the visitor with the same calendar he had before.

3) I need a mechanism to update the cookie whenever the visitor changes months.

This seems like it should be doable. I'd appreciate it if anyone could give a newbie some hints. Otherwise, it's back to google and read read read!

runner

4:20 pm on Nov 13, 2004 (gmt 0)

10+ Year Member



I've done some more reading and I think I've figured out that this can be done using an SSI include that executes a perl script. The perl script handles all the cookie stuff and displays the correct calendar. I'm going to move this over to the perl board.