cookie path

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

cookie path

Post by m2babaey »

Hi
When I send a cookie to a visitor's PC, with the file: public_html/resellers/savecookie.php
1.Then can I detect that cookie when I'm reading the file: public_html/payments/detectcookie.php?
2.how about public_html/phpfiles.php?
3.and how about subdirectories? (like public_html/resellers/subdirectory/a_php_file.php?
Thanks for your answers
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: cookie path

Post by jackpf »

Cookies set will be sent back by the browser to the domain that set it, in any directory equal to or lower than the path set.

Test it out. Best way to learn.
Post Reply