Here is the short story...

1. All HTTP messages have a header and a body section.  The header includes
content type (HTML, text, GIF, etc), the length of the content, login info,
etc, etc.  The body contains the actual data.

2. The head and body sections are seperated by a blank line.

3. You need to print the "Content-type" header line, plus a blank line (to
denote the end of the head section) before printing any HTML, text, or other
data.

Example:

print "Content-type: text/html\n\n";
# print the body stuff here.

The only requirement is that you print out the content type plus a blank
line before printing anything else.  The content type is the MIME type.
Common MIME types are "text/html" for HTML and "text/plain" for text.

Hope that helps.

Rob

-----Original Message-----
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 12:22 PM
To: [EMAIL PROTECTED]
Subject: html in a cgi script


I am just starting to learn perl and am reading about cgi.pm
I have read about creating an appropriate header and using the start_html 
line, but can someone please give me an example of their html inside a
script?

TIA

--
Matthew Harrison
Internet/Network Services Administrator
Peanut-Butter Cheesecake Hosting Services
genestate
www.peanutbuttercheesecake.co.uk

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to