Answer the question
In order to leave comments, you need to log in
Different cookies for each page how?
I have OpenServer on my local domain. Site work.
We have pages like:
Answer the question
In order to leave comments, you need to log in
Move the files to different folders, for example work/name.php to work/name/index.php and put setcookie("CookieName", "CookieValue");
. Cookies will be written for this directory. And it's easier to enter work/name in the browser. Where did you see www.example.com/forum.php ?
path=PATH - This attribute sets the subset of documents for which the cookie value is valid. For example, specifying "path=/win" will cause the cookie value to be valid for many documents in the /win/ directory, in the /wings/ directory, and files in the current directory with names like wind.html and windows.shtml. In order for cookies to be sent on each request to the server, you must specify the server's root directory, for example, "path=/".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question