Cita:
GRACIAS!!! <?python
#!/usr/bin/python2.5
#
######### don't change the following three lines: ###########
import cgi
print "Content-Type: text/html\n"
form = cgi.FieldStorage()
## add a form.getvalue for each of the names in your form: ##
drink = form.getvalue("drink")
########## start of HTML code ###########
print """
<html>
<head> <title>What would you like to drink</title> </head>
<body>
<h4>Your drink: </h4><p>
"""
############ end of HTML code #############
if drink == "tea":
print "You requested tea"
elif drink == "coffee":
print "You requested coffee"
elif drink == "hot chocolate":
print "You requested hot chocolate"
else:
print "You need to select a drink!"
########### start of HTML code ###########
print """
<p>Thank you for your visit. Please come again. <p>
</body></html>
"""
############# end of HTML code ##############
?>
#!/usr/bin/python2.5
#
######### don't change the following three lines: ###########
import cgi
print "Content-Type: text/html\n"
form = cgi.FieldStorage()
## add a form.getvalue for each of the names in your form: ##
drink = form.getvalue("drink")
########## start of HTML code ###########
print """
<html>
<head> <title>What would you like to drink</title> </head>
<body>
<h4>Your drink: </h4><p>
"""
############ end of HTML code #############
if drink == "tea":
print "You requested tea"
elif drink == "coffee":
print "You requested coffee"
elif drink == "hot chocolate":
print "You requested hot chocolate"
else:
print "You need to select a drink!"
########### start of HTML code ###########
print """
<p>Thank you for your visit. Please come again. <p>
</body></html>
"""
############# end of HTML code ##############
?>