I know I am coming in late in this conversation, but here is my contribution anyway:
http://developer.irt.org/script/600.htm
This is an answer to a question that gives SetCookie and GetCookie routines. This would allow you to store the stuff in a cookie using JS if you do so wish. I, too, recommend php. It is a powerful language, and gives all the benefits that everyone has been talking about already.
Anyway, just wanted to let you know about that site, and that question for the code therein. Good Luck!
-Ted