CodeIgniter Forums
Updated 3.1.10 this->input->method('post') doesn't work - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forum-6.html)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forum-17.html)
+--- Thread: Updated 3.1.10 this->input->method('post') doesn't work (/thread-73113.html)



Updated 3.1.10 this->input->method('post') doesn't work - bertug - 03-20-2019

Hello,
Firstly, I m sorry about my English. I used ci 3.1.9 and today i see 3.1.10 relased version and i updated. but when i check my codes are working true, i find the following codes not work :
PHP Code:
if($this->input->method('post')){
...
}
else
redirect('404'); 
where i used this if statement doesn't work. when i debug :
PHP Code:
echo $this -> input -> method('post'); die(); 
result on display

GET
how can i fixed that? I don't wanna use the following code :
PHP Code:
if($this->input->post()){
...
}
else{
redirect('404'
Thank you for helping.


RE: Updated 3.1.10 this->input->method('post') doesn't work - InsiteFX - 03-20-2019

PHP Code:
// TRUE or FALSE for upper or lower case ( POST or post )
if($this->input->method(TRUE))
{
 
   ...
}
else
{
 
   redirect('404');


Try that.