Join Bill Weinman for an in-depth discussion in this video Keeping context with hidden fields, part of CGI Essential Training.
So as we go through the process of submitting the form and then going back…and editing and then going back and sending, the CGI application needs a way…of keeping context.…Because every single connection is a separate session and you don't have any way…of knowing if a particular connection is from a particular user or not.…There needs to be some breadcrumbs, there needs to be some way of keeping…track of which connection is which and what it is that the application needs…to do with what data.…
This is done with hidden fields.…Let's go ahead and fill in this form and look at an example of how this works.…So here is the confirmation page.…It says here is the message that I typed.…Do I want to edit it or send it?…I am going to go ahead and do View Source and we'll take a look down here…at this form here and we have between form and end form. This is just one of the buttons.…Now, here we have the input type submit and so that's the button itself and…then the rest of this is actually hidden fields and what's in these hidden fields? …
- Understanding the server requirements for CGI
- Installing CGI scripts on Unix and Windows servers
- Coding form elements into an HTML page
- Keeping context with hidden fields on a web form
- Learning best practices for creating CGI content