Reply to cookie question

Your name:

Reply:


Posted by Eric on 12/20/05 03:34

I'm playing around with cookies mostly as a learning experience.
I cant seem to get an html page to set a cookie. I'm a bit confused
about headers , which to send first etc.
Here's my strategy
....
<body>
<!--#exec-cgi="/cgi-bin/setcookie.cgi" -->
</body>

The cgi just writes
"Set-Cookie: hello=its_me" to stdout
My question is:
is this correct?

int main(void) {
printf("Set-Cookie: hello=its_me\n");
printf("Content-type: text/html\n\n");
return 0;
}

Because i dont see a cookie show up on disk on the client side.
And there are no errors in my apache 2.2 logs (linux based system)
And also, my client is IE6 on windows and its not blocking cookies.
I watch the cookies dir under Documents and settings and the cookie
never shows up, although i can see cookies arrive from other places
like google.
Can someone straighten me out here?
Thanks
Eric

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация