It is known that traditional imperative web servers use a stateless model for users with stateless programming, meaning that an application executes and then terminates. This leads to problems in retrieving and keeping track of user data. For instance, in online shopping, accidentally clicking the buy button twice can make a second purchase of the same item. This is a kind of dangling-reference problem (no pointer to keep user data effectively). In this work we take a brief look at functional programming, their fundamental properties, their advantages over imperative languages, and their real world applications. We also explore a functional programming approach via Scheme using the concept of continuation to solve the dangling-reference problem of an imperative web server.