Welcome Guest, Not a member yet? Register   Sign In
redirect doesn't work
#8

[eluser]max123[/eluser]
Code:
function create_search_agent()  //create a new search agent
        {            
            $this->load->model('vacancy_model');
            $this->load->model('profile_model');
            $this->load->model('search_agent_model');
            $this->load->helper('url');

            $data=array();
            if (($this->session->userdata('email'))== NULL)
                {
                $this->session->set_flashdata('message', 'Please login to view this page.');
                redirect('home/index/-'.$var);
                }
            $email=$this->session->userdata('email');                        
            $user_id= $this->profile_model->get_id_by_email($email);
            $id=$user_id;
            $search_agents = $this->search_agent_model->get_search_agents($user_id);
            $rows = $search_agents->num_rows();
            if($rows>=3)
            {
                redirect('/seeker/my_searches','refresh');
                 echo "[removed]alert('You cannot create more than 3 search agents');[removed]";
            }
            
            $data['controller'] ="set_search_agent/$id";                
            $data['keyword']             = '';
            $data['category_id']         = '';
            $data['country_id']             = '';
            $data['city_id']             = '';
            $data['date_posted_id']     = '';
            $data['heading']            ="Create a search agent";            
            $data['job_categories2']    =    $this->vacancy_model->get_job_categories(); //get job categories
            $data['countries']            =$this->vacancy_model->get_countries(); // get countries
            $data['city_states']        =$this->vacancy_model->get_city_states(); // get cities and states
            $data['date_posted']        =$this->vacancy_model->job_posted_dates(); // get cities and states
            
            $data['user_id']         = $this->profile_model->get_id_by_email($this->session->userdata('email'));    //gives an error when remove this redundent line

            $data['header']            =    $this->top_job->get_header($this->redux_auth_model->getUserGroupByUserId($email)); //get header            
            $data['display_name']    =    $this->profile_model->set_get_display_name($this->session->userdata('email'));        
            $data['loginPage']        =    $this->load->view('login',$data, TRUE);
            $data['banner']            =    $this->load->view('banner',$data,TRUE);        
            $data['footer']            =    $this->load->view('footer','',TRUE);

            $this->load->view('seeker/search_agent_create',$data);
        }


Messages In This Thread
redirect doesn't work - by El Forum - 02-11-2010, 11:58 PM
redirect doesn't work - by El Forum - 02-12-2010, 12:02 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:14 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:17 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:20 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:23 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:23 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:26 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:29 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:37 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:41 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:58 AM
redirect doesn't work - by El Forum - 02-12-2010, 01:03 AM
redirect doesn't work - by El Forum - 02-12-2010, 01:18 AM
redirect doesn't work - by El Forum - 02-12-2010, 02:06 AM
redirect doesn't work - by El Forum - 02-12-2010, 02:31 AM
redirect doesn't work - by El Forum - 02-12-2010, 04:01 AM
redirect doesn't work - by El Forum - 02-13-2010, 01:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB