Welcome Guest, Not a member yet? Register   Sign In
POSTing to CodeIgniter API

Hey Guys,

I'm working with a codeigniter website with API and for some reason I am unable to get server-side content from POST requests. 

Here is some code samples of the API. Everything works fine when POSTing from the website to the server, but via a service like POSTman I cannot seem to view data as I normally would aka $this->input->post('my_field') 


Any help would be greatly appreciated!

(This post was last modified: 08-15-2017, 06:54 PM by jarmen_kell.)

judging from the way you code your PHP script,
you're doing it wrong.

you couldn't just catch a value from a function that doesn't have any 'return' words.
and the way you put your 'return' r-word from the index clearly indicates that you
needs to understand the way how a simple 'functional' (or a little OOP) works.

here's a resource that might help on understanding how function works.

and here's also a little insight about how OOP works in PHP.
probably not the best tutorial, but it should do:

Theme © iAndrew 2016 - Forum software by © MyBB