Re: embedding a CGI script in a HTML page?

[email protected] (David Dorward) Tue, 16 Dec 2008 13:29:20 +0000
Newsgroups perl.beginners.cgi
Message-ID <[email protected]>
Adam Jimerson wrote:
> Correct me if I am wrong but these template systems seem to only handle
> output from the CGI script, which would be nice if my scripts only
> handled output but they also need user input
1. Browser sends input data to server

2. Server sends input data to program using CGI interface

3. Program does something (possibly with the data) and generates output data

4. Program passes output data to template

5. Template places output data into some HTML (or whatever)

6. Template passes HTML combined with output data to the program

7. Program outputs HTML combined with output data to server using the 
CGI interface

8. Server sends output HTML back to the browser

Templates are used because it is easier to edit HTML in a template then 
it is to edit Perl that generates HTML.

-- 
David Dorward