• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function does not work

#1
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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