# SOS, how to get the parameters introduced in a form

**URL:** <https://www.ruby-forum.com/t/sos-how-to-get-the-parameters-introduced-in-a-form/88822>\
**Category:** Rails\
**Created:** [March 14, 2007, 6:49pm UTC](https://www.ruby-forum.com/t/sos-how-to-get-the-parameters-introduced-in-a-form/88822 "2007-03-14T18:49:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![burbu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbce88/32.png) [@burbu](https://www.ruby-forum.com/u/burbu)\
**Post date:** [March 14, 2007, 6:49pm UTC](https://www.ruby-forum.com/t/sos-how-to-get-the-parameters-introduced-in-a-form/88822/1 "2007-03-14T18:49:19Z")

</div>

I’m studying at university and I have being asked to do an application  
with ruby on rails that given a web page where you have to subscribe  
introducing some information in a form, later, after registering, you  
can see the data introduced and advising the user that he has been  
correctly subscribe.  
The problem is that I don’t know a lot about ruby on rails, I know I  
must have my own data base but I have some questions. First of all, what  
should I have in the controller and what for? Because I have put this:

class PrincipalController \< ApplicationController  
def form  
render\_text “Hola a todos”  
end  
def enviaDades  
@subscriptor = @params[:subscriptor]  
@addr = @params[:address]  
@ciutat = @params[:ciutat]  
@cpostal = @params[:cpostal]  
@tcnum = @params[:tcnums]  
@dcaduc = @params[:dcaduc]  
@cc = @params[:cc]

```
    redirect_to :action => 'form2'
  end

```

end  
end

Is that correct??

Which are the different data I have in my data base. Know the problem,  
is that I don’t know what should I do next, to make the user see that  
parameters and the advise telling him that all was correct. I have put  
something like this, but i don’t know how to show the parameters.

 Subscripció Enwebats: Comformació   

### S'ha cursat la seva sol.licitud amb les dades:
  
  
 \<%print @subscriptor%\> \<%print @addr%\>

If it helps, here is the code of the web page where the form is:

 Subscripció Enwebats: Comformació   
 Nom: 

Adreça:

Ciutat: Codi Postal:

Núm. Tarjeta Crèdit: Caduca: (MM/AA)

AMEX VISA

Tapes Enquadernables (+10 euros)

Thanks.

---

<div class="post-metadata">

**Author:** ![burbu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbce88/32.png) [@burbu](https://www.ruby-forum.com/u/burbu)\
**Post date:** [March 14, 2007, 8:04pm UTC](https://www.ruby-forum.com/t/sos-how-to-get-the-parameters-introduced-in-a-form/88822/2 "2007-03-14T20:04:35Z")

</div>

burbu wrote:

> I have put  
> something like this, but i don’t know how to show the parameters.
> 
> \<%print @subscriptor%\>  
> \<%print @addr%\>

Use \<%= @my\_var %\> to show variables form the controller.
