-3

my site works well in localhost (everything works fine)

but when I upload it in web and try to redirect the page after updating the data it says -> Cannot modify header information

rt8s
  • 1
  • 2

2 Answers2

1

95% you are trying to set a cookie, mime-type or redirection (short: http header) after you have sent http body, i.e. content. Check if you you have anything including whitespaces outside the php delimeters.

Zsolt Szilagyi
  • 4,741
  • 4
  • 28
  • 44
0

If you use the header function you have to be careful... You can't send any header before the "header location".

ob_start('mypage');
    <html>
             // Your code ...
    </html>
ob_end_flush();

What's the error ? (php.ini, active the errors)

Else you can use the ob_start() function !

Dimitri
  • 922
  • 2
  • 13
  • 34