I am currently trying to manage my bilingual site a little better. Currently, the content of both languages is contained in the same page and I use sessions to decide which content is shown to the user. I would like to use cookies instead because i am told that sessions are insecure and they do not validate with the w3c validator (i used to be proud of having all valid html....). I have been learning about using cookies in php and my main problem is that a cookie can only be set before the html of a page is called. The problem, it would seem, is getting the user to make the choice between the two languages (in my case irish and english). Because i can't (as far as i can see) have them click on a link and have the cookie set accordingly. The best idea i have come up with is a page with two links, one to my irish redirect page and another to my english redirect page. The irish redirect page would set the cookie to irish before redirecting the user to my homepage while the english redirect page would set the cookie to english before redirecting the user to the homepage. I would prefer not to use this method as it seems messy to me so I am asking here to see if there is some better way. Also I would like to know if it is possible to set a cookie for an infinite length of time instead of a year, month or day as there is no real reason for this cookie to expire and (this one may seem a little obvious) can the value of a cookie bechanged without destroying that cookie and making a new one? Also what is the code to for a redirect after a certain function has been executed (as opposed to after a certain amount of time).
Thank you for all your help in advance and please feel free to voice any idea to handle the matter, even staying with sessions, I value your oppinion
Thanks
Thank you for all your help in advance and please feel free to voice any idea to handle the matter, even staying with sessions, I value your oppinion
Thanks
