Your conceptual ideas are spot on. You have to use a server-side language to collect and store the data.
Theres several methods which can be employed when storing data, the most common being database connectivity. Other mediums include, textfiles, cookies, and XML files. Another common method would be to send the data via email, which in this case, is what you will need to do.
The best thing to do from this point; choose a language and read up on some common form-date-handling techniques. Some good sources are listed below.
Some common server-side languages include, PHP, ASP, CGI, JSP, and ColdFusion.