Getting error as parse error-unexpected at line x and error message headers already sent..what does that mean?

Recommended Answers

All 2 Replies

That means you are sending output before calling the header() function in your script.

Check for the following explanation from http://php.net/manual/en/function.header.php

Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.

Member Avatar for diafol

Perhaps it would help if you posted your code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.