0

I'm creating the android app for my code igniter web site and i want to save data through restful web service but when i send request to my put method it's giving me wrong result.

this is my to view the result.

$data = $this->request->body = file_get_contents('php://input');
    print_r($data);

Result:

------WebKitFormBoundary1FuQsccaxrxHWI5A Content-Disposition: form-data; name="1"

name ------WebKitFormBoundary1FuQsccaxrxHWI5A Content-Disposition: form-data; name="2"

address ------WebKitFormBoundary1FuQsccaxrxHWI5A--

this is my request body:

enter image description here

Yaseen Ahmad
  • 1,807
  • 5
  • 25
  • 43

1 Answers1

1

You need to get data from post

Example

$data = $_POST['name'];
Yaseen Ahmad
  • 1,807
  • 5
  • 25
  • 43