title: Trouble getting simple cakephp search form to work
body: <p>I keep getting the error that my variable is not defined in my view.  This is actually my first ever search form (not just for cake) and I'm sure I must be doing it wrong.  here is my controller code:
  <strong>UPDATE</strong>  Here is the new code, both for the controller action and the html form.</p>
  
  <pre><code>&lt;?php
  $options = array('house' =&gt; 'House', 'condo' =&gt; 'Condo', 'hotel'=&gt;'Hotel');
  $attributes = array('legend' =&gt; 'Property:&lt;span style="font-style:italic"&gt;(Please select one)&lt;/span&gt;');
  echo $this-&gt;Form-&gt;radio('Unit.type', $options, $attributes);
  ?&gt;
  &lt;?php echo $this-&gt;Form-&gt;end('Search'); ?&gt;
  </code></pre>
  
  <p>which gives me this output:</p>
  
  <pre><code>&lt;form action="/lodgings/search" id="UnitIndexForm" method="get" accept-charset="utf-8"&gt;
  &lt;fieldset&gt;&lt;legend&gt;Property:&lt;span style="font-style:italic"&gt;(Please select one)&lt;/span&gt;&lt;/legend&gt;
  &lt;input type="hidden" name="type" id="UnitType_" value=""/&gt;&lt;input type="radio" name="type" id="UnitTypeHouse"  value="house" /&gt;
  &lt;label for="UnitTypeHouse"&gt;House&lt;/label&gt;
  &lt;input type="radio" name="type" id="UnitTypeCondo"  value="condo" /&gt;
  &lt;label for="UnitTypeCondo"&gt;Condo&lt;/label&gt;
  &lt;input type="radio" name="type" id="UnitTypeHotel"  value="hotel" /&gt;
  &lt;label for="UnitTypeHotel"&gt;Hotel&lt;/label&gt;
  &lt;/fieldset&gt;
  &lt;div class="submit"&gt;
  &lt;input  type="submit" value="Search"/&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Now my controller logic:</p>
  
  <pre><code>function search() {
  
  $result = array();
  if (isset($this-&gt;params['url'] ))
  {
  $type = $this-&gt;params['url'];
  $conditions = array("Unit.type = " =&gt; $type, 'Unit.active'=&gt;1);
  $result = $this-&gt;Unit-&gt;find('all', array('conditions'=&gt; $conditions));
  $this-&gt;log(print_r($result, true));
  $this-&gt;set('type', $result);
  
  }
  </code></pre>
  
  <p>}    </p>