2 $this->input->post :one is empty and the other returns ok - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: 2 $this->input->post :one is empty and the other returns ok (/showthread.php?tid=75853) |
2 $this->input->post :one is empty and the other returns ok - RRIOS - 03-23-2020 I have 2 simple and identical files (logically writing to different tables). They use forms to register 2 and 3 values using inputs. But one is returning empty. I already checked if the path is pointing to the file where I write to the bank. (yes, it's going to the right file, because I put print_r () and die (). Returns the ok array PHP Code: <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4"> PHP Code: <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4"> It works PHP Code: function cadastrar() Empty PHP Code: public function cadastrar() RE: 2 $this->input->post :one is empty and the other returns ok - includebeer - 03-24-2020 Maybe because you have spaces at the wrong places (name and value) : Code: <input type="text" class="form-control" id="cnometur" name="cnometur "placeholder="Nome da Turma" value=""required> Should be: Code: <input type="text" class="form-control" id="cnometur" name="cnometur" placeholder="Nome da Turma" value="" required> RE: 2 $this->input->post :one is empty and the other returns ok - RRIOS - 03-24-2020 (03-24-2020, 02:11 PM)includebeer Wrote: Maybe because you have spaces at the wrong places (name and value) : OHHHH..my god! Many days of home office, stressed ... and that was exactly the mistake! A space at the end .... kkkkkkkk THANK YOU ! RE: 2 $this->input->post :one is empty and the other returns ok - includebeer - 03-24-2020 Haha! That’s funny but very frustrating when it happens! Glad it’s working now! |