Sridhar_Rao
In the zone
I looked all around the web, but could not find an article simple enough (for dummies) on setting and manipulating session cookies.
I have a poll running on PHP/MySQL and simple refreshing the page inserts the same data to the table. I don't want people to post again, so I want a session cookie which would expire (say in 5-10 minutes).
My requirements are as follows:
1. A function would check as the poll loads if the browser is set to accept sessions cookie. The javascript code, the functions and where to place, how to call etc.
2. A sessions cookie is set with expiry for 5 minutes. Code with example and explanation
3. Poll is submitted, if user resubmits or refreshes, a function should disable it and inform that it has been disabled.
I found information on setting, manipulating and reading very confusing. Someone please in as elementary language as possible, explain with examples.
I have a poll running on PHP/MySQL and simple refreshing the page inserts the same data to the table. I don't want people to post again, so I want a session cookie which would expire (say in 5-10 minutes).
My requirements are as follows:
1. A function would check as the poll loads if the browser is set to accept sessions cookie. The javascript code, the functions and where to place, how to call etc.
2. A sessions cookie is set with expiry for 5 minutes. Code with example and explanation
3. Poll is submitted, if user resubmits or refreshes, a function should disable it and inform that it has been disabled.
I found information on setting, manipulating and reading very confusing. Someone please in as elementary language as possible, explain with examples.