setcookie() function use HTTP header/meta data to set cookie, that need to be sent before any real content. You can set cookie after sending image, in that cause, you have to use JavaScript, PHP can't help you there as it sit behind a web server and HTTP protocol required all mata data need to be before real content.





Reply With Quote

Bookmarks