<div class="gmail_quote">On Thu, Mar 10, 2011 at 8:50 PM, Benjamin Kaplan <span dir="ltr"><<a href="mailto:benjamin.kaplan@case.edu">benjamin.kaplan@case.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">>   print "Content-Type: text/html"<br>
>   print<br>
>   print '''<br>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br>
> "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"><br>
> <html><br>
> <head><br>
><br>
> and this has worked in the past, so I'm surprised it doesn't work here.<br>
> Don't understand what I've done wrong, nor why it prints the first line to<br>
> screen.<br>
> TIA,<br>
> Beno<br>
><br>
<br>
</div></div>Typically, people developing web applications use a framework such as<br>
Django or TurboGears (or web.py or CherryPy or any of a dozen others)<br>
rather than just having the CGI scripts print stuff out. Rather than<br>
having your Python script just print out a page, you make a template<br>
and then have a templating engine fill in the blanks with the values<br>
you provide. They'll also protect you from things like Injection<br>
attacks and cross-site scripting (if you don't know what those are,<br>
you're probably vulnerable to them).<br>
<font color="#888888"><br></font></blockquote><div>ok. I'm looking into Django. I'm ok for injections and I think most of 
my data is sanitized. Now, can someone please address my question? See 
above.<br>
TIA,<br>
Beno <br></div></div><br>