Welcome Guest, Not a member yet? Register   Sign In
Redirect Problem
#1

[eluser]Unknown[/eluser]
Hello friends,

When i echo some thing and then i write redirect then it can't work.
like:

i have one application for sending sms when i update few records using CI then after i call this function which is sending sms then after i call redirect function.

ex:


$this->mdl_common->sendSMS_API($mobNo,$updatePwd);

echo "hi";

redirect("login/reEnter/userName/".base64_encode($user->userName)."/companyCode/".base64_encode($this->input->post("companyCode")));

Check the code as above which is not working. Here i can't write die or exit after echo other wise it can't working here means it can't redirect but it works look like die..
Please help me for this problem immediately. thanks in advance...
#2

[eluser]Skuja[/eluser]
redirect() function is sending raw HTTP 'Location' of 'Refresh' headers, any output before these headers will cause headers already send error.
more about headers you can read in php reference manual:
http://lv.php.net/header




Theme © iAndrew 2016 - Forum software by © MyBB