• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
redirect doesn't work

function add_vacancy()
$user['user_id'] = $this->session->userdata('email');
$user['user_group'] = $this->redux_auth_model->getUserGroupByUserId($user['user_id']);
echo $new_user_id = $this->officer_vacancy->create_new_user($user);

redirect('/officer/officer_vacancy/new_vacancy', 'refresh');

This is my function. 'officer' is the sub folder inside the controller folder. Following is the error

A PHP Error was encountered
Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\Mycareergate3\system\application\controllers\officer\home.php:17)

Filename: helpers/url_helper.php

Line Number: 528

Please help me to solve this problem

do not echo if you want to redirect, remove the echo
echo $new_user_id = $this->officer_vacancy->create_new_user($user);

Thank you so much flaky. I was struggling for hours to solve this. May god bless you. I would hug you if you were close by me. Thanx Thanx Thanx alot

no problemo
glad I could help

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.