controller redirect and foward? [solved]

Hi,

I trying out CGridView widget in my application. When user click on view icon, it will be directed to the controller, where I then redirect them to other pages depending on their id. Why is it that CController->redirect prompted error and CController->forward do works?

Btw I’ve got header cannot be modified error. The problem is I backtrack, I haven’t render or echo anything before the redirect.

If you tell us more about the error, maybe we could help…

Also check your files for spaces before <?php on top.

Thanks Mike! You’re right. I save the php file in a wrong format. I save it as UTF-8 when I am required to save as UTF-8 without BOM.

i think i have the same problem,

how can we redirect to the last page in cgridview(admin) after create/update some record?

please show me the code.

regards. :)