Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 665839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:45:09+00:00 2026-05-13T23:45:09+00:00

there is one think, i can’t understand anyway:((( when i try to set cookie(it

  • 0

there is one think, i can’t understand anyway:(((
when i try to set cookie(it is on line 28 in login.php), browser returns me an error!!!

Cannot modify header information – headers already sent by (output started at C:\xampp2\htdocs\video\index.php:9) in C:\xampp2\htdocs\video\login.php on line 28

but on line 9 in index php, i haven’t any header!!! there is a tag!!!
i cant understand it!!! can somebody tall me why it returns me such error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:45:10+00:00Added an answer on May 13, 2026 at 11:45 pm

    Cookies are sent as headers. From the PHP docs for setcookie:

    setcookie() defines a cookie to be sent along with the rest of the HTTP headers. Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including and tags as well as any whitespace.

    Also, if your page is saved in UTF-8 format, the BOM (Byte Order Mark) will stop you from being able to set any headers, as it counts as output. See http://bugs.php.net/bug.php?id=22108. To get around this you need to save your file without the byte order mark.

    See also: Byte order mark#Unwanted BOMs – Wikipedia

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is one thing that I do not understand... Imagine you have a text
Is there a goal one can execute that will just echo the version of
Apologies for the non-descriptive question; if you can think of a better one, I'm
There are two ways, that I can think of, to obtain similar results from
There's one thing I haven't found in RFC 2616 ("Hypertext Transfer Protocol -- HTTP/1.1")
There is one thing I really love about LXML, and that the E builder.
Defining custom components in Facelets is easy and quick but there's one thing I
I'm fairly new to programming, and there's one thing I'm confused by. What is
I've been working with pthreads a fair bit recently and there's one little thing
So there's the Do One Thing rule in the book Clean Code. But how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.