Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

about cookies

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

about cookies

Postby Xerpher » Sun Oct 06, 2002 8:00 pm

lets say this cookie is set...

Code: Select all
setcookie ("test", $val, time()+3600, '/');

What is the '/' for?
Xerpher
New php-forum User
New php-forum User
 
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada

Postby Jay » Sun Oct 06, 2002 11:02 pm

The domain. It doesn't really need to be set, but I find that if I use '/' it stops unknown bugs concerning cookies popping up. Basically that / means the cookie value can be used in any directory in that site (you can have different values for the same variable for different portions of the site).

Have a look at the setcookie() function
Jay
 


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 9 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron