Exercise 51. Getting Input from a Browser

While it’s exciting to see the browser display “Hello World,” it’s even more exciting to let the user submit text to your application from a form. In this exercise we’ll improve our starter web application by using forms and storing information about users into their “sessions.”

How the Web Works

Time for some boring stuff. You need to understand a bit more about how the web works before you can make a form. This description isn’t complete, but it’s accurate and will help you figure out what might be going wrong with your application. Also, creating forms will be easier if you know what they do.

I’ll start with a simple diagram that shows you the different parts of a web request and how the information ...

Get Learn Ruby the Hard Way: A Simple and Idiomatic Introduction to the Imaginative World of Computational Thinking with Code, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.