Hello everyone,
I'm learning Perl again!
I am writing a CGI script that has two possible outcomes. So I have broken up the HTML output into four parts:
Beginning (header and the start of the HTML)
Option 1 OR
Option 2
Ending (remainder of the HTML)
This works fine as a program, the different options display according to the input. However, at the top of the second and third parts to display (ie. Option 1 and then the Ending or Option 2 and then the Ending), there is an annoying piece of text that shouldn't be there:
Quote:
Content-Type: text/html; charset=ISO-8859-1
The code for the various HTML outputs is:
-
-
if ($id == $transaction) {
-
-
# we can print the results
-
-
print header, <<"EOF";
-
-
[various HTML stuff]
-
-
EOF
-
-
For the Beginning, this works without any unseemly messages. For the Options and End the message appears. I have tried adding:
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1-strict.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
To the non-Beginning outputs, but this has not surpressed the message.
Does anyone have an idea as to what to try next?
Thanks!
David