SitePoint Sponsor |
|
User Tag List
Results 1 to 13 of 13
Thread: Cookies not working in Netscape
-
Feb 11, 2001, 10:34 #1
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
My current code:
if ($ratings) { if (isset($rate_id)) { $cookie = 1; } else { setcookie ("rate_id", $id, time()+(3600*24), "", "nortiq.com", 0); /* Expires in a day */ } }
Isn't working for netscpa.e
Howveer, its perfectly fine with Internet Explorer.
Any errors?
Thanks Guys"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
-
Feb 11, 2001, 16:13 #2
- Join Date
- May 2000
- Location
- Canada
- Posts
- 533
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
setcookie ("rate_id", $id, time()+(3600*24), "/", "nortiq.com", 0);
that should work... netscape is more touchy about things arecogito, ergo sum
-
Feb 11, 2001, 21:43 #3
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Oh...cool
Thanks for your help.
So you cna't use empty quotes eh?"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
-
Feb 11, 2001, 21:46 #4
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hmm..I tested it again
It still doens't work
netscpae 4 and netscaape 6/mozilla builds
all don't work
any solutions?
thanksLast edited by lynlimz; Feb 11, 2001 at 21:54.
"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
-
Feb 11, 2001, 22:35 #5
- Join Date
- Dec 2000
- Location
- Idaho, USA
- Posts
- 452
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I also am having the same problem... works great in IE but not in NS 4.7+
Any Ideas? I'm using this code....
Code:setcookie ("my_username", $username, time()+(3600*3), "/", "beartoothbullets.com", 0);
Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.
Exbabylon- Professional Internet Services
-
Feb 11, 2001, 22:39 #6
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sigh..
This really sucks eh..
I thought this was a server side code which would be understood by all the browsers..
guess the setcookie isn't.
BTW..how do you check whether a cookie is set in netscpae 4 and mozilla builds?
i just test out my script..if it reocrds the vote more thna once, then a cookie isn't set...hmm.."Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
-
Feb 11, 2001, 22:47 #7
- Join Date
- Dec 2000
- Location
- Idaho, USA
- Posts
- 452
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I've been playing with it all evening... and yes it does suck
I have to use them for a database of loading data... the user excepts the agreement, then he can view the stuff... or if he is registered, he can enter his username/password to keep from having to enter them all throughout the site... I have been using cookies... planning this huge site to use cookies... and now it goofs up on me...
I'll keep playing with it.. see if I can get NS to take it... if I do I'll let you know..
God BlessBlamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.
Exbabylon- Professional Internet Services
-
Feb 11, 2001, 23:06 #8
- Join Date
- Dec 2000
- Location
- Idaho, USA
- Posts
- 452
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I got it!
here is the correct code for you..
Code:setcookie ("rate_id", $id, time()+(3600*24), "/", ".nortiq.com", 0);
please note, this only works if the url has the www in front of it in NS so..
if user goes to http://nortiq.com, the cookie will not work... however,
http://www.nortiq.com will.
So, you may be able to use a header(location: ) to redirect them to www.nortiq.com
note... IE will work with this code with or without the www... so IE is not affected I don't think
hope this helps!Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.
Exbabylon- Professional Internet Services
-
Feb 11, 2001, 23:43 #9
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hi,
can i set multiple rate_id with different values?
like 1 rate_id for every article?
thanks
hmm..okie..i'll give it a try..thanks exbablylon"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
-
Feb 12, 2001, 00:27 #10
- Join Date
- Dec 2000
- Location
- Idaho, USA
- Posts
- 452
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I think that you will have to do something like this:
Article one
Code:setcookie ("rate_one", $id, time()+ 3600*24), "/", ".nortiq.com", 0);
Code:setcookie ("rate_two", $id, time()+ 3600*24), "/", ".nortiq.com", 0);
Otherwise you will overwrite the cookie rate_id each time you set it...
God Bless, hope that the cookie thing works out.Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.
Exbabylon- Professional Internet Services
-
Feb 12, 2001, 00:32 #11
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
oh..cici..okie
thanks for your help!"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
-
Feb 12, 2001, 00:57 #12
- Join Date
- May 2000
- Location
- Canada
- Posts
- 533
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
i was just going to say the "." thing, but i guess i was a little late in checking this post
but nice to see that you have got it workingcogito, ergo sum
-
Feb 12, 2001, 01:02 #13
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yep
Thnaks Vinay
I managed to get the cookie to work. =)"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
Bookmarks