Welcome Guest, Not a member yet? Register   Sign In
[Problem] PHP Error page
#1

[eluser]Unknown[/eluser]
Well, I have problems calling a function I get an error "A PHP Error was encountered ".
How I can customize the error? for example I redirect to another page

image example. http://imgur.com/Xeo0N.png

codigo.
Code:
public function perfil($id_usuario) {
      
// try {
// $id_usuario = $_REQUEST['id'];
// } catch (Exception $exc) {
// redirect(base_url());
// }

        if (empty($id_usuario)) {
            redirect(base_url());
        }
        $this->load->model('usuario_model', '', TRUE);
        $user_array = $this->usuario_model->fin_by_id($id_usuario);
        if (!empty($user_array)) {
            
        } else {
            $data['message'] = 'El usuario Solicitado no existe';
            $this->load->view('page_message',$data);
        }
    }

Sorry my English. :roll:
#2

[eluser]John_Betong_002[/eluser]
Try setting a default to your perfil() function:

Code:
public function perfil($id_usuario=NULL) {
#3

[eluser]Unknown[/eluser]
[quote author="John_Betong_002" date="1301654748"]Try setting a default to your perfil() function:

Code:
public function perfil($id_usuario=NULL) {
[/quote]
Exactly! Thanks men.




Theme © iAndrew 2016 - Forum software by © MyBB