Forgive me if this sounds like a commonly asked question, but I've
searched high and low and read all the books and I'm still struggling.
I'm trying to park the Data from an HTML form into a session and then
retrieve it. Maybe I'm trying to do the wrong, I dont know. The idea is
that they fill in the form, go to a confirmation screen, then go to a
final form where it's submitted to the database. I'm not even sure if
thats the right logic. I think I need to park the data in a session. But
I cant see how.
All I can get in a session is one piece of data and I dont know how to
Here's what I have:
This is in my Controller
@checkin = params[:checkin]
@checkout = params[:checkout]
@nights = params[:nights]
and this is small snippet of my form:
<% form_tag(:action => "confirm_form") do %>
<p>checkin:<%= text_field_tag("checkin") %></p>
and so on...
<%= submit_tag("next") %>
which works and can be retrieved on the next page like this:
Checkin: <%= @checkin %> <br>
Checkout <%= @checkout %> <br>
Nights: <%= @nights %> <br>
But how do I put that data in a session to be retrieved when ever I
I'm struggling here, this is confusing the heck out of me.
Maybe I should be just parking it all in a DB. i just dont know.
Thank for any help at all.