SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Dec 2003
    Location
    South Korea
    Posts
    232
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cookie Question...

    i have a users system set up. Now i run various if end statements to check if the user is in the database when they log in. If everything is good, then i want it to set up a cookie. However, i keep getting an error that says
    Warning: Cannot modify header information - headers already sent by blahblah.

    I think this is because my cookie isn't set at the top of the script but AFTER the checks. Is there any way i can set up this cookie w/out getting this error? *note.. i don't want to use sessions, but cookies only.

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure that you don't echo anything out with a echo or have anything before the <?php tag. That means not even a white space.

    If that does not help, you can use the Output Control Functions.

    -Helge


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
  •