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-692c318369a77040832342/] Contact_form.php - view [crayon-692c318369a86777551952/] Contact_model [crayon-692c318369a8e822888472/] Captcha Helper [crayon-692c318369a96694502633/] Notifications_model [crayon-692c318369aa2079722633/] Database…

7 years ago

Delete Files and Execute Database Query remotely

[crayon-692c318369dcc884442914/] [crayon-692c318369dd1037287953/]  

7 years ago

Random String Codeigniter

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

7 years ago

Codeigniter Ajax Form Validation Example

Create Controller [crayon-692c318369faf026429539/] 2. Create View File [crayon-692c318369fb2155001511/]  

7 years ago

Codeigniter passing 2 arguments to callback – Email validation

[crayon-692c31836a06e525010098/] [crayon-692c31836a070459929957/]  

7 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…

7 years ago