Results 1 to 10 of 24

Thread: Day 10 - Let's Eat Cookie - Become PHP Expert in 30 days

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2014
    Posts
    21

    Default

    there is something wrong with the cookie thing.
    i read about it and understood it should be first thing to do in a code.
    is there something like that?

    if why is it like that? why cant we print or show an image an later set a cookie?

  2. #2
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Quote Originally Posted by Austinwhite View Post
    there is something wrong with the cookie thing.
    i read about it and understood it should be first thing to do in a code.
    is there something like that?

    if why is it like that? why cant we print or show an image an later set a cookie?
    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.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •