CodeIgniter Forums
How can I use ob_start with redirect - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How can I use ob_start with redirect (/showthread.php?tid=44933)



How can I use ob_start with redirect - El Forum - 08-31-2011

[eluser]Unknown[/eluser]
Hi,

I have view page submit its form to some controller then redirect back to the view page with new records.

I'm sure there is no blank spaces. I tried this solution and its works fine with me:
http://digitalpbk.com/php/warning-cannot-modify-header-information-headers-already-sent

I set output_buffering = On on php.ini file.

but I need to use ob_start()instance of changing php configuration file.

How I can do it in my situation:
view sent form -> controller update database record -> controller redirect to view page again with new records.

Where should I write this function in my code?

Message error:

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at D:\Programs\xampp\htdocs\Students_Website\application\models\cpanel_model.php:1)

Filename: helpers/url_helper.php

Line Number: 546