I’ve added ‘remember me’ to blog comments. I haven’t asked, it just does it; is that bad?
Anyway, with PHP, it was ridiculously easy. Set the cookie with setcookie("author",$author, time()+2592000,"/") and retrieve it with $author=$_COOKIE["author"] . For more info see the setcookie documentation.
It’s Friday, so here’s your Biscuit:
Rejected and illusioned, [Anwar] Tomorrow left for the continent where he eventually teamed up with Spud Dresden of ‘Pisspoor Learjet’ to record the globally massive ‘Wattle ‘n’ Daub – The Origins of House’.
from the sleeve notes of Trouble Over Bridgwater.
Clagnut news · Half Man Half Biscuit
XariusX wrote:
Well it isn’t that bad. If the user has cookies enabled, they will get it. If they get a warning they can choose not to accept, and if they don’t have cookies on-nothing is broken…
It’s not an invasion of privacy at all is it?
Rich wrote:
My feelings exactly. Afterall I don’t store the information – it’s held in cookies on the user’s local machine.
Of course I could store the details and just set a unique ID in the cookie instead. However I don’t want to do that for a number of reasons, not least because of Data Protection Act issues.
Michael wrote:
You can always note that it’s being stored in a cookie in the Notes, then if people don’t want that they can just choose not to post :)
I have a question. I’m very young with PHP, so forgive me my stupidity :(
But where do you call setcookie from, and how do you tell it where it finds the ‘author’. I’ve played around with it a bit, but couldn’t get it working :(
Rich wrote:
“But where do you call setcookie from, and how do you tell it where it finds the author.”
Essentially I’m setting up a the cookie to store the variable
author="author name", orauthor=$author.$author accesses the value of the form field with name ‘author’ (which, confusingly, is labelled ‘name’ on the interface).
Stop the British National Party (BNP) wrote:
Is a ‘pisspoor Learjet’ an executive jet that crashes straight after takeoff? :)))