[BioPython] Passing DNA sequence to CGI script

Omid Khalouei omid9dr18 at hotmail.com
Fri Nov 7 01:16:47 EST 2003


Hello,

I've had this problem for 2 weeks now and have tried everything that I could 
come up with, I would really appreciate your feedback. This is actually a 
very basic task that I want to perfom with HTML forms but for some reason it 
doesnt' seem to be working. I'm using apache on Windows XP.

I'm trying to send a DNA sequence from an HTML form to a cgi script located 
in the cgi-bin of my apache server. Although I get to execute the cgi script 
after pressing the "submit" button of the form, the sequence or any other 
input doesn't seem to be passed to the script.

I have simplified the files and enclosed them here.
Thank you in advance for your reply.

Sam Khalouei


******************************************
<html><head></head>
<body>

<form action="/cgi-bin/seq.cgi" method="post">
<input type="text" name="sequence"><br>
<input type="submit" value="Submit Sequence">
</form>

</body></html>

******************************************
#! C:\Python23\python.exe

import sys, cgi, cgitb; cgitb.enable()

print "Content-Type: text/html\n"

form = cgi.FieldStorage()
if (form.has_key("sequence")):
    print "sequence recieved!"
    print form["sequence"].value
else:
    print "No sequence recieved!"
*******************************************

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*   
http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca



More information about the BioPython mailing list