PROBLEM with form in cgi

Tim Roberts timr at probo.com
Tue Oct 1 06:10:09 CEST 2002


"CheapSkate" <gua81 at XXXyahoo.com> wrote:

>HI,
>I'm having problem trying to figure out what is wrong with my cgi script.
>
>here's the code that's creating the problem in the apple.cgi
>
>print """<form action="delete.html" name="myform" method="post">"""
>                             ^
>it keeps on saying invalid syntax in the action(as indicated)
>and if I try to change it to this
>print """<form action="delete.html" name="myform" method="post">"""
>                             ^
>it gives the error at action.

Who is giving you the syntax error?  Python?  How do you know?  Is the
error from your server log?  There's nothing wrong with that statement as
posted, but as Steve posted, you need to check for unmatched triple-quotes
above it.

It isn't very useful to have a straight HTML page be the "action" for a
form.  You will want to use another CGI script so you can read the
parameters from the query.
--
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list