Current location: Hot Scripts Forums » Programming Languages » PHP » Setting COOKIES problem....


Setting COOKIES problem....

Reply
  #1 (permalink)  
Old 04-01-04, 12:30 AM
ArksI's Avatar
ArksI ArksI is offline
Newbie Coder
 
Join Date: Mar 2004
Location: Bulgaria
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Question Setting COOKIES problem....

Hi Guys!
I experienced the following thing and have no explanation about why things happened like that, so if you can - help please...
So here I go:
I'm trying to set cookie at a site (~e-shop). And have a file where my functions stay - function.php.
By incident after the ?> I've put an interval (i mean " ") and the didn't set.
We found out that the problem was that interval, but could not explain it.
So if anybody can tell me why that has happened - PLEASE help.

regards,
ArksI
Reply With Quote
  #2 (permalink)  
Old 04-01-04, 02:39 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
so you are saying that after you closed the tags you typed " " ?
when you did that the cookie wasn't set ?!
I can't see a problem in that unless you were trying to set the cookie after this file is excuted (the one with "") ..

it's better to show the part where you setcookie() and the one with "" !
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #3 (permalink)  
Old 04-02-04, 05:25 AM
ArksI's Avatar
ArksI ArksI is offline
Newbie Coder
 
Join Date: Mar 2004
Location: Bulgaria
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
well the real problem was that after the '?>' there were some spaces actually...
and i was asking why that could be a problem
Reply With Quote
  #4 (permalink)  
Old 04-02-04, 09:59 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
Quote:
Originally Posted by ArksI
well the real problem was that after the '?>' there were some spaces actually...
and i was asking why that could be a problem
because spaces are considered an output as well !
so a space will be output to user and then oyu can't setcookie() !
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #5 (permalink)  
Old 04-05-04, 03:00 AM
ArksI's Avatar
ArksI ArksI is offline
Newbie Coder
 
Join Date: Mar 2004
Location: Bulgaria
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
thank you a lot
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting cookies - if/else FayeC ASP 0 01-29-04 11:45 PM
cookie problem darkcarnival PHP 11 12-27-03 06:17 PM
Delete cookies regardless of case. AussierulesOK JavaScript 1 11-08-03 10:15 AM
Can't seem to get the cookies to the cookie_jar benny666 Perl 1 10-28-03 04:54 AM
problem in cookies @ phppro list vb2vb PHP 13 06-22-03 08:04 PM


All times are GMT -5. The time now is 10:22 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.