Three cookies
3 recipes from a second database, cookies.db. Click one.
How this page talks to the database
open database "cookies.db" set chosen to query "id" set recipes to ask database "select * from recipes where id = ?" with chosen set ingredients to ask database "select amount, item from ingredients where recipe_id = ?" with chosen set recipe to first of recipes show "<h1>[name of recipe]</h1>" for each ingredient in ingredients show "<li>[amount of ingredient] [item of ingredient]</li>" end
Values after with are sent to the database separately from the SQL, so a visitor cannot inject SQL through the URL. Text from the database is made safe before it is shown. The same page as a standalone file is in examples/cookies.