Forum Moderators: phranque

Message Too Old, No Replies

Select a first page

         

Mr_Cat

1:11 am on Nov 30, 2008 (gmt 0)

10+ Year Member



Folks,

I've got a community website on the gorw, it's consiting of an essential three basic parts, and I thought it would be just too cool to be able to offer people a selection of which basic main page they saw when they first entered the site.

I asume this would be cookie based somehow, but I'm not sure what to search for and have tried a few things to no avail.

Can anyone point me in the right direction, or is it not really that simple?

Cheers
Mr Cat

GaryK

1:16 am on Nov 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's fairly simple. One option would be to set a cookie with a numeric value. The value will determine what page the visitor sees. Alternately, you could use a string value that's more descriptive, but generally numeric values are more efficient. Do you understand the basics of setting and reading cookies? If not we can cover that first. Let us know what your server software is, and what scripting languages you have at your disposal please.

Mr_Cat

1:36 am on Nov 30, 2008 (gmt 0)

10+ Year Member



Hmm, well I'm afraid I understad little of cookies.

I have a good unsterstanding of html, I'm getting slowly to grips with some basic php and css, but cookies I've yet to venture into, I'd like to have a link on certain pages to set them as ones 'homepage' when one enters the site.

My server space is apache/mysql but I'm not sure what more info to give other than that. I hope that's some vague help? I've tried a few searches but not sure what to look for specifcially.

[edited by: Mr_Cat at 1:37 am (utc) on Nov. 30, 2008]

GaryK

1:43 am on Nov 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it were me, I'd go with JavaScript to set/read the cookies. When someone clicks on your "homepage" link call a JavaScript function to set the cookie. W3Schools is a good site to learn from, and WebmasterWorld seems to permit links to it, so here's a brief tutorial on setting/reading cookies in JavaScript: [w3schools.com...] If you need something less abstract just post here and I'm sure we'll all do our best to help you out.

Mr_Cat

1:55 am on Nov 30, 2008 (gmt 0)

10+ Year Member



Great! Thanks! I'm acquainted with W3Schools, fab stuff, I'll give it my best.

Cheers for the pointers.