Welcome Guest, Not a member yet? Register   Sign In
Function does not work
#1

(This post was last modified: 12-17-2016, 09:35 AM by Myster.)

Hello,

I have a function to modify the profile, however, it displays "error" instead of "success" I do not know why, here is my code

PHP Code:
 public function modifier_mon_profil($user_id)
 
      {
 
        $userinfo $this->ion_auth_model->profil_user($this->ion_auth->get_user_id());
 
        $this->smarty->assign("meta_titre"'Modification de votre profil');
 
        $this->smarty->assign("meta_description"'Modifiez votre profil');
 
        $this->smarty->assign("info"$userinfo );
 
         
          if 
(!$this->ion_auth->logged_in())
 
           {
 
              redirect('/connexion');
 
           }
 
         if ($this->ion_auth->get_user_id() == $userinfo->id)
 
            

               $this
->form_validation->set_rules('email''<b>E-mail</b>''required');
 
              $this->form_validation->set_rules('sexe''<b>Sexe</b>''required');


 
              if ($this->form_validation->run() == TRUE)
 
                {
 
                      $user_id $this->ion_auth->get_user_id();
 
                      $sexe $this->input->post('sexe');
 
                      $rpgmaker $this->input->post('rpgmaker');
 
                      $biographie $this->input->post('biographie');
 
                      $signature $this->input->post('signature');
 
                      $siteweb $this->input->post('siteweb');
 
                      $email $this->input->post('email');
 
                   if ($this->Ion_auth_model->editprofil($user_id$sexe$rpgmaker$biographie$signature$siteweb$email))
 
                     {
 
                        
                     
echo 'Success'
 
                        
                      
}
 
                     else {
 
                      echo 'Error';
 
                     }

 
 
               
                 
}
 
        

Sorry for my bad english, i speak French, i use Google Translate
Reply
#2

This must not be the whole method/function because you have 6 opening braces { and only 4 closing braces }.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB