PHP - cookies and header location: Cannot modify header information - headers already sent by -


this question has answer here:

this user log in page. after user enter log in details, want store cookie files , direct user home page. however, keep getting error have tried every possible way solve , have read other questions posted on here nothing did solve problem... missing here? be?

<?php //<--- line 4 

error messages:

warning: cannot modify header information - headers sent (output started @ /www/99k.org/p/h/o/phoneclassmate/htdocs/login.php:4) in /www/99k.org/p/h/o/phoneclassmate/htdocs/login.php on line 6 

the issue you're trying send http headers (location:) after html code.

you should refactor code avoid that; or hack can work around using output buffering, that'll allow modify http headers after started outputting html content. not great way handle problem imho know anyway; see http://ca.php.net/manual/en/function.header.php#refsect1-function.header-notes


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -