I'm struggling to discover why my CGI python script will only print one value it obtains from an order form. I have a form on order.html with the following opening tag-
<form name="cInformation" method="post" action="http://csusap.csu.edu.au/cgi-pub/bbuckl05/order.cgi" onsubmit="return validate()">
I won't post it's contents as its quite extensive, however I can guarantee that all of it's input fields have consistent names which I use in my .cgi script. My .cgi script obtains a list of values as such-
#!/usr/bin/env python
# Import modules for CGI handling
import cgi, cgitb
# Create instance of FieldStorage
form = cgi.FieldStorage()
# Order quantities, data from fields
bolt_quantity = form.getvalue('qbolt')
nut_quantity = form.getvalue('qnut')
washer_quantity = form.getvalue('qwasher')
bolt_cost = form.getvalue('total1')
nut_cost = form.getvalue('total2')
washer_cost = form.getvalue('total3')
total_cost = form.getvalue('totalcost')
And afterwards, it attempts to post them-
# Prints the customer's order information
print "<h4><p>Order Information:\n</h4>"
print "Quantity of bolts ordered: %s (%s)" % (bolt_quantity, bolt_cost)
print "<br/>Quantity of nuts ordered: %s (%s)" % (nut_quantity, nut_cost)
print "<br/>Quantity of washers ordered: %s (%s)" % (washer_quantity, washer_cost)
print "<br/><br/>Total Cost: %s" % (total_cost)
These are just portions of my code, if necessary I can provide the entire script. The problem is, that it ONLY ever correctly prints the quantity of bolts ordered, NOTHING else, as viewable in the screenshot below-
I hope I've given enough information. Can anybody help me to find and fix the issue?
Thank you,