I am sending data from android. Into android when i input data from edittext, then my code works fine. But when i am selecting some data from dropdown, then this error occured.
-------------------------------------------------------------------------------------------------
and My Model class code is......................................
Since none of this appears to be relevant to the error message in the subject line of your message, I'm guessing that the error has something to do with whatever data you've placed into the json variable in your POST. You really need to check your data before using it in database queries, and you really need to be careful about what you're encoding/decoding in JSON. By default, json_decode() will create stdClass objects from any objects you've encoded in the JSON string. More than likely, you encoded a control or something a little more complex than the value of a form control, then passed it straight through to $this->db->insert().