Results 1 to 6 of 6
Thread: Another cookie question
Feb 1, 2001, 14:40 #1
- Join Date
- Jan 2001
- Helsingborg, Sweden
- 0 Post(s)
- 0 Thread(s)
The syntax for setcookie is int setcookie (string name [, string value [, int expire [, string path [, string domain [, int secure]]]]]).
I'm currently developing some stuff here at home and thus my host is localhost.
I can set path to '/' and it will work, but I can't figure out what to set domain to. I read somewhere that it requires at least two "dots" (.hmmm.com). If so, what should I do when my host is localhost?
While we are on the subject. Does anyone know a smart way to generate the string for path and domain with the help of the Apache environment variables? Do you know what I mean? I want the users of my software to be able to edit the path and domain, but I want them to default to '/user/' and '.mydomain.com' if the script is located in 'http://mydomain.com/user/'. Here is one more example:
http://www.mydomain.com/' would be '/' and 'www.mydomain.com'."Some people play hard to get - I play hard to want."