CodeIgniter Forums
How to change the url adress? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: How to change the url adress? (/thread-9601.html)



How to change the url adress? - El Forum - 07-01-2008

[eluser]Rubiz'[/eluser]
Hello

I'm with a basic question, but I cant resolve this now...
I have a email sender, and I'm refreshing page to send emails periodically.

When user clicks button "SEND!", my app redirects to a url "sender/create_sender_database", than should redirect to the "sender/status_page" that displays sending status.

This status page has a meta tag refreshing page set to 2 minutes. It returns me results from "sender/trigger" url by ajax.

But my problem is that my adress bar in the status page is with URL "sender/create_sender_database" when my intention is not that, so it is creating database and looping the wrong function Sad

I'm trying use redirect() to set the adress bar right url, but its returning me: headers cannot be modified... blablabla... blablabla...

Anyone knows what could I do?


How to change the url adress? - El Forum - 07-01-2008

[eluser]Rubiz'[/eluser]
Well, I discovered that it was an "echo" I had put for debugging, but problem persists, cause I have another error when the page reloads:

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/bandeira/public_html/email_sender/system/application/controllers/sender.php:64)

Filename: helpers/url_helper.php

Line Number: 487


How to change the url adress? - El Forum - 07-01-2008

[eluser]Rubiz'[/eluser]
I'm discovering that my echos are generating those problems, but what can I do to skip it?


How to change the url adress? - El Forum - 07-01-2008

[eluser]Rubiz'[/eluser]
Code:
function method()
{
  ob_start();
  blablabla
  ob_end_flush();
}

Solved the problem.