Note this code is slightly improved from book version. I've placed the input element inside the form tag. Thanks to Jim for the catch!