Need help in a Simple CGI
Bruno Mattarollo
brunomadv at ciudad.com.ar
Sun May 16 20:04:13 EDT 1999
Hi!
The simplest:
#! /usr/sbin/env python
import cgi
form = cgi.FieldStorage()
if form.has_key("name") and form.has_key("email"):
fh = open('store.txt','a')
fh.write(form["name"].value)
fh.write("\t")
fh.write(form["email"].value)
fh.write("\n")
fh.close()
That's it ... You then could import directly the results into an excel
spreadsheet for example.
If you want more detailed solutions, perhaps the use of database, try Gadfly
... :-)
Cheers,
/B
Bruno Mattarollo <bruno at gaiasur.com.ar>
... proud to be a PSA member <http://www.python.org/psa>
> -----Original Message-----
> From: python-list-request at cwi.nl [mailto:python-list-request at cwi.nl]On
> Behalf Of Jose A. Antich
> Sent: Sunday, May 16, 1999 6:44 PM
> To: python-list at cwi.nl
> Subject: Need help in a Simple CGI
>
>
> Hey pals I need help!!!
>
> I need to write a simple a CGI Script that stores Names and E-mails from a
> form of a webpage. I can't seem to find the simple commands to store and
> create a little database. I have tried the Python Website and
> some tutorials
> I will really apreciate your help....! Thank's a lot
>
> J.Antich
> jaa418 at telcel.net.ve
>
More information about the Python-list
mailing list