title: Updating a row in cakephp
body: <p>I need to update a particular row. This doesn't seem to work. Any help is appreciated.</p>
  
  <p>View <em>updated</em>: </p>
  
  <pre><code>&lt;?php
  echo $this-&gt;Form-&gt;create("Setting", array('action' =&gt; 'index'));
  echo $this-&gt;Form-&gt;input('id', array('type' =&gt; 'hidden'));
  echo $this-&gt;Form-&gt;checkbox('blog_state');
  echo $this-&gt;Form-&gt;end('Save Post');
  ?&gt;
  </code></pre>
  
  <p>Controller <em>updated</em>: </p>
  
  <pre><code>public function index($id = 0){
      $this-&gt;Setting-&gt;id = $id;
      if (empty($this-&gt;request-&gt;data)) {
          $this-&gt;request-&gt;data = $this-&gt;Setting-&gt;read();
      } else {
          if ($this-&gt;request-&gt;is('post')) {
              $this-&gt;request-&gt;data['Setting']['id'] = $id;
              $this-&gt;Setting-&gt;save($this-&gt;request-&gt;data);
              $this-&gt;Session-&gt;setFlash('This should have saved...');
          }
      }
  }
  </code></pre>
  
  <p><strong>Edit:</strong>
  blog_state is a boolean, and works fine. It loads the value from the DB normally and saves it to the new row normally. (I need it to update the existing row it is being pulled from, which is where my problem is)</p>