Cookies in non-frame sites
| From: | emil at vanster dot nu | Date: | Sun, 26 Feb 2006 11:25:26 +0000 |
| Subject: | Cookies in non-frame sites | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-231102@lists.php.net to get a copy of this message | ||
Hello,
Most sites today seems to be based on this style:
include(top);
include(current_page);
include(bottom);
If one wants to set cookies from current_page, how should that be handled with as clean source as
possible?
Before I had the top and bottom output as functions that are called from each page, so I can call
header stuff before it's executed. But it's not a very good looking approach.
I did it like this in every page:
include(top_bottom_lib);
// cookie stuff
echo getTopPage();
// page stuff
echo getBottomPage();
I hope you understand my problem.
Thanks
Best regards Emil