Topic: Params is empty

Hi I am new to Ruby on Rails.I have html select and label elements in my view.But when I try to get the value of the select by id
"selectmarka" as params[:selectmarka] it returns empty.Here is the code:

  <%=form_tag do %>
  <select id="selectmarka" name="lists">
  <% @MarkaAdi.each do |m| %>
  <option value="<%=m.MarkaAdi %>"><%=m.MarkaAdi %></option>
  <%end%>
  </select>

<% @TipAdi=List.where("MarkaAdi='"+session[:key] +"'")%>

  <select id="selecttip" name="lists">
  <% @TipAdi.each do |t| %>
  <option value="<%=t.TipAdi %>"><%=t.TipAdi %></option>
  <%end%>
  </select> 

<%=session[:key]%>
<input type="hidden" id="hid" name="hid" value="<%=session[:key] %>" />

  <select id="year" name="lists">
  <%(1999..2013).each do |i| %>
  <option value="Y"+"<%=i%>"><%=i%></option>
  <%end%>
  </select>

  <br>Deger:<label id="deger" name="deger"><%=@result%></label>
  <br>Marka Kodu:<label id="markakodu" name="markakodu"></label>
  <br>Tip Kodu:<label id="tipkodu" name="tipkodu"></label>

  <%end%>

Thank you

Last edited by esonat (2013-06-26 03:05:06)