By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,968 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,968 IT Pros & Developers. It's quick & easy.

setcookie problem

P: n/a
setcookie('nordicnet_registration', $uplinenumber); // SESSION COOKIE TO BE
SET

I have this cookie I have to set that will be session-based (cookie deletes
when browser session is closed, the classic). However, the cookie is set in
/Main_page/registrering.php so the path for the cookie is incorrect; I want
the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a
path, I have to set a time int value at the same time.

I want to set the path and NOT the time int. How do I do that?

Phil
Jul 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Phil Powell wrote:
[...]
I want to set the path and NOT the time int. How do I do that?


doesn't it work setting the time to 0? (not tested, hth)

<?php
setcookie('nordicnet_registration', $uplinenumber, 0, '/');
?>
--
"Yes, I'm positive."
"Are you sure?"
"Help, somebody has stolen one of my electrons!"
Two atoms are talking:
Jul 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.