cookies setup

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

murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

cookies setup

Post by murthy »

how to-setup the cookies in php.

Basic problem is : cookies are not set-up in few browsers.


Please respond as early as possible....


:?:
Kirshna
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

was it too hard to read the manual?
[php_man]setcookie[/php_man] wrote:bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]])
murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

Post by murthy »

Hi ,

Thanks for your quick response.......

I used that function only.......

please visit my site http://www.searchchips.com

username : catherine
password: catherine

thanks
krishna
murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

Post by murthy »

Hi ,
With the setcookie() function i am not able to setup the cookie...

please help me....

thnaks
krishna
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

uh, why?
murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

Post by murthy »

please gothrough once my site:

http://www.searchchips.com
murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

Post by murthy »

please continue the discussion.....
murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

Post by murthy »

I used this ,

setcookie ("member_id", "$id", time()+360000,"/",".lotofcontent.com");
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

murthy wrote:I used this ,

setcookie ("member_id", "$id", time()+360000,"/",".lotofcontent.com");
Get rid of that '.' in front of 'lotofcontent.com'. So the line should look like this:

Code: Select all

<?php
setcookie ('member_id', $id, time()+360000, '/', 'lotofcontent.com');
?>
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

and if your site isn't "lotofcontent.com", it wont work anyways.
murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

Post by murthy »

hi ,
waiting for your resoponse


Krishna
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

PLEASE, only post when you need to (ie when someone asks you, when something new comes up, etc), and provide us with as much detail as possible (the more code the better, as in, how you set it, how you're trying to use it, more on the situation, etc).

Thanks.
murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

Post by murthy »

My site URL is : http://www.searchchips.com but my hosting name http://www.lotsofcontent.com......
murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

Post by murthy »

Hi ,

My Site url is : http://www.searchchips.com

and Hostname is : lotofcontent.com

I used the function like : setcookie ("member_id", "$id", time()+3600000,"/","lotofcontent.com");

In my browser getting problem with cookie setup....
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

.....

congratulations, you have a parse error.. we can't help you much without some details about it.. like code :roll:
Post Reply