Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Storing prefs in cookies??

Quote Reply
Storing prefs in cookies??
Hi all,

I'm setting up a site with two sets of templates, one is image based the other text based, I know i could give the end user the option to choose which version they would like to use by default so when they visit the site this is the version they see first, i dont know a thing about cookies. could someone tell me how to do this.

Thanks


Regards

MDJ1
http://www.isee-multimedia.co.uk
mark@isee-multimedia.co.uk
Quote Reply
Re: Storing prefs in cookies?? In reply to
There are some links in the Perl/CGI forum to Personalized Cookie Home Page sites.

What you could do with MySQL is the following:

1) Create a Visitor table. In this table, you can include the following fields:

* Username (should be CHAR(25))
* Password (should be BINARY(25))
* Email Address (should be CHAR(25))
* Template (should be ENUM with words or numbers)

2) Then use the Editor login scripts as a model for having people login to your site (you could also use cookies with this...however the reason that I suggest creating a "Visitor" table is that people can access their "preferred" layout from ANY computer NOT just one set with cookies). The fields you should "check" are the Username and Password. Then you will have to add some codes that will go to the page.cgi script for whatever Template they select.

As soon as I fully upgrade my LINKS site to LINKS SQL, I will be working on a Members script (using one Members table) --> (similar to what Widgetz has working with his forum.cgi and review.cgi) that will include the following:

a) Search Agents (up to six)
b) Links (up to 100)
c) Access to Reviews

etc....

Regards,

Eliot Lee
Quote Reply
Re: Storing prefs in cookies?? In reply to
mylinks.cgi for links sql uses the User database for the links.. no cookies..

same thing can be done with user preferences..

Jerry Su
email@jerrysu.com
http://www.jerrysu.com/