Transfer data from webpage form to database

Alan Kennedy alanmk at hotmail.com
Tue Nov 23 15:43:01 EST 2004


[Pete]
 > [snip]
 > Below is the code from my webpage form:
 >
 > <form action="default.asp" method="post">

You should note that the action attribute of a form must contain the URL 
to which the form variables will be POSTed.

If you are writing a python CGI script, then action="default.asp" is 
almost certainly wrong, unless you have called your python script 
"default.asp".

The URL for your python script is the value that should go in the action 
attribute, like so

<form action="http://mydomain.com/cgi-bin/my_cgi_script.py" method="post">

or you could leave out the server name bit.

<form action="/cgi-bin/my_cgi_script.py" method="post">

HTH,

-- 
alan kennedy
------------------------------------------------------
email alan:              http://xhaus.com/contact/alan



More information about the Python-list mailing list