title: Inserting data by sending PUT request in CodeIgniter (Phil Sturgeon Rest Server)
body: <p>There is a difference between a PUT and POST request I send through a REST CLIENT in my API. It is implemented in CodeIgniter with Phil Sturgeon's REST server.</p>
  
  <pre><code>function station_put(){
  
      $data = array(
          'name' =&gt; $this-&gt;input-&gt;post('name'),
          'number' =&gt; $this-&gt;input-&gt;post('number'),
          'longitude' =&gt; $this-&gt;input-&gt;post('longitude'),
          'lat' =&gt; $this-&gt;input-&gt;post('latitude'),
          'typecode' =&gt; $this-&gt;input-&gt;post('typecode'),
          'description' =&gt; $this-&gt;input-&gt;post('description'),
          'height' =&gt; $this-&gt;input-&gt;post('height'),
          'mult' =&gt; $this-&gt;input-&gt;post('mult'),
          'exp' =&gt; $this-&gt;input-&gt;post('exp'),
          'elevation' =&gt; $this-&gt;input-&gt;post('elevation')
      );
  
      $id_returned = $this-&gt;station_model-&gt;add_station($data);
      $this-&gt;response(array('id'=&gt;$id_returned,'message'=&gt;"Successfully created."),201);
  
  
  }
  </code></pre>
  
  <p>this request successfully inserts data into the server BUT - it renders the rest of the values NULL except for the id.</p>
  
  <p>But if you change the function name into station_post, it inserts the data correctly.</p>
  
  <p>Would somebody please point out why the PUT request does not work? I am using the latest version of google chrome.</p>
  
  <p>Btw this API will be integrated to a BackBone handled app. Do I really need to use PUT? Or is there another workaround with the model saving function in backbone when using post?</p>