Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error

Status
Not open for further replies.

alexxxis

Programmer
Sep 21, 2006
38
RO
Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdocs\new\inregistrare.php:17) in c:\apache\htdocs\new\inregistrare.php on line 30

this is the kind of errors i`m getting. I`m trying to make a user authentication. I have php triad installed and i don`t know why i`m getting these errors. A friend said it`s because i have to many sessions started. but if i try to start it only in the index, and not in the includes ... won`t work. i mean i can`t log in. I don`t know if you understood anything, but i`m a noob in php and this is the only way i can put it. Is there another way to redirect to another page ... that won`t give me this error ?
 
You are probably already outputting some html or text to the page therefore you can't re-modify sent headers. To get around this you need to set the script as an entire object before sending it to the browser.

Put the following at the top of your php script:
Code:
ob_start();

... rest of the script here

Now put this at the end of the script:
Code:
ob_end_flush();

Hope this helps!

NATE


Got a question? Search G O O G L E first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top