capturing textbox data

I have a textbox, where I will fill user_id. And then on submission of
that, the same page gets loaded passing the value of the textbox. And
at
last I need to fire some query to show relevant recordset in an HTML
table format. Please help..
very argent
suppose i have table :users;
attributes1):user_id
           2):user_name and id:primary_key
how i will write simple view and controller with respect to user_id..