Categories: Uncategorized

How can I check if request was a POST or GET request in codeigniter?

if ($this->input->server('REQUEST_METHOD') == 'GET')
   //its a get
else if ($this->input->server('REQUEST_METHOD') == 'POST')
   //its a post

 

Share

Recent Posts

Sample Contact Form with validation, Captcha & Notification

Contact Controller [crayon-6630d1eb066a8998013167/] Contact_form.php - view [crayon-6630d1eb066b6156834239/] Contact_model [crayon-6630d1eb066bd590582540/] Captcha Helper [crayon-6630d1eb066c5734413731/] Notifications_model [crayon-6630d1eb066ce678014370/] Database…

5 years ago

Delete Files and Execute Database Query remotely

[crayon-6630d1eb06a77573292738/] [crayon-6630d1eb06a7f356447993/]  

5 years ago

Random String Codeigniter

[crayon-6630d1eb06c0d354936364/] The first parameter specifies the type of string, the second parameter specifies the length.…

5 years ago

Codeigniter Ajax Form Validation Example

Create Controller [crayon-6630d1eb06d34883686326/] 2. Create View File [crayon-6630d1eb06d3a122911366/]  

6 years ago

Codeigniter passing 2 arguments to callback – Email validation

[crayon-6630d1eb06e91085186677/] [crayon-6630d1eb06e98201538915/]  

6 years ago

Setting Error Messages

All of the native error messages are located in the following language file: system/language/english/form_validation_lang.php To set…

6 years ago