Hi all!
I am just starting to learn this!
My questions may be silly and there may be minor mistakes that I cannot figure out. Please help me make my program running!
Thanks in advance...
First I have an order form in html file which is to be redirected to the cgi and display the shopping cart. I have done all the coding, but the html is redirected to the cgi file but the shopping cart is never displayed! I have uploaded the files to a linux server...
order.html file is placed in public_html and
process.cgi is in the cgi-bin...

order.html CODES as follows.. also find it online in the link http://csusap.csu.edu.au/~rgauta01/i...rt2/order.html

Code:
<?xml version = "1.0" encoding = "utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- order.html
     The order page for 'Nuts 'R' Us'
     -->
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="task2.css" />
<script type="text/javascript" src="validatecalculate.js"> </script>
 <title>Nuts 'R' Us - Order</title>
  </head>
  <body onload="return setFocus();">
<table class="table">
    <tr><td><h1> Nuts 'R' Us </h1></td></tr>
    <tr><td class="text2"> The best store in town.</td></tr>
    <tr><td>
	<table class="table2">
	<tr><td class="td1"><a href = "main.html">  Home  </a></td><td></td>
    <td class="td1"> <a href = "order.html">Order </a></td><td></td>
    <td class="td1"> <a href = "http://csusap.csu.edu.au/cgi-pub/rgauta01/process.cgi">Shopping-Cart </a></td></tr>
	</table></td>
     </tr>
     <tr><td>
	<hr />
	</td></tr>
	<tr><td><form action = "http://csusap.csu.edu.au/cgi-pub/rgauta01/process.cgi" method="post" id="myform">
  <table class="table">
<tr><td>First Name:</td>
	<td><input type = "text"  name ="fname"  id="fname" /></td></tr>
<tr><td>Last Name:</td>
	<td><input type = "text"  name ="lname" id="lname" /></td></tr>
<tr><td>email:</td>
	<td><input type = "text"  name ="email" id="email" /></td></tr>
<tr><td>Phone:</td>
	<td><input type = "text"  name ="phone" id="phone" /></td></tr>
<tr><td>Street Address:</td>
	<td><input type = "text"  name ="saddress" size ="50" id="saddress" /></td></tr>
<tr><td>Suburb:</td>
	<td><input type = "text"  name ="suburb" size ="30" id="suburb" /></td></tr>
<tr><td>Postcode:</td>
	<td><input type = "text"  name ="pcode" size ="30" id="pcode" /></td></tr><tr><td colspan="2" class="text3">Payment Details</td></tr> 
<tr><td colspan="2">Type of card: &nbsp;&nbsp;
<input type="radio" name="cardtype" value="visa" id="visa" checked="checked" />Visa
<input type="radio" name="cardtype" value="mastercard"  id="mastercard" />Mastercard
<input type="radio" name="cardtype" value="amex" id="amex" />Amex
<input type="radio" name="cardtype" value="diners"  id="diners" />Diners</td></tr> 
<tr><td>Name on Credit Card:</td>
<td><input type = "text"  name ="ccname" size ="50" id="ccname" /></td></tr>
<tr><td>Credit Card Number</td>
<td><input type = "text"  name ="ccnum" maxlength ="16" size ="50" id="ccnum" /></td></tr>
<tr><td colspan="2" class="text3">Expiry Date</td></tr>
<tr><td>Month(MM):</td>
<td><input type = "text"  name ="edatemonth" size ="5" maxlength ="2" id="edatemonth" /></td></tr> 
<tr><td>Year(YY):</td>
<td><input type = "text"  name ="edateyear" size ="5" maxlength ="2" id="edateyear" /></td></tr>
<tr><td>CVV:</td>
<td><input type = "text"  name ="cvv" size ="5" maxlength ="3" id="cvv" /></td></tr>
<tr><td colspan="2" class="text3">Order Details</td></tr>
<tr><td colspan="2"><table class="table3">
<tr><th>Item</th>
<th>Product Code</th>
<th>Diameter</th>
<th>Length</th>
<th>Colour</th>
<th>Unit</th> 
<th>Quantity</th>
<th>Price($)</th></tr>
<tr><td>Bolt</td><td>B113</td>
<td>9</td><td>50</td>
<td>Black</td>
<td>2.15</td>
<td class="td1"><input type ="text" name ="qnty1" size="3" onchange="CalculateTotal()" id="qnty1" value="0" /></td>
<td class="td1"><input type ="text" name ="tot1" size ="3" id="tot1" value="0.00" readonly="readonly" /></td></tr>
<tr><td>Nut</td>
<td>N234</td>
<td>5</td>
<td>N/A</td>
<td>Silver</td>
<td>0.45</td>
<td class="td1"><input type ="text" name ="qnty2" size ="3" onchange="CalculateTotal()" id="qnty2" value="0" /></td>
<td class="td1"><input type ="text" name ="tot2"  size ="3" id="tot2" value="0.00" readonly="readonly" /></td></tr>
<tr><td>Washer</td>
<td>W359</td>
<td>8</td>
<td>N/A</td>
<td>Silver</td>
<td>0.30</td>
<td class="td1"><input type ="text" name="qnty3" size ="3" onchange="CalculateTotal()" id="qnty3" value="0" /></td>
<td class="td1"><input type ="text" name ="tot3" size ="3" id="tot3" value="0.00" readonly="readonly"  /></td></tr>

 <tr><td colspan = "6" class="td2">Total:
</td><td class="td1"><input type ="text" name ="totqnty" size ="3" id="totqnty" value="0" readonly="readonly" /></td>
<td class="td1"><input type ="text" name ="totamount" size ="3" id="totamount" value="0.00" readonly="readonly" /></td></tr>
</table></td></tr>

<tr><td colspan="2" align="center"><input type = "reset"  value = "Reset" />&nbsp;
<input type = "submit"  value = "Submit" name="submit" onclick="return validate_form();"/></td></tr></table>

  </form>
	
	</td>
</tr>
<tr><td colspan="2">
<a href="http://validator.w3.org/check?uri=referer"><img
        src="http://www.w3.org/Icons/valid-xhtml10"
        alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
</td></tr>
<tr><td class="td1">
<hr />
&copy; Nuts 'R' Us - 2011. All Rights Reserved.
	
	</td>
</tr>

   
  </table></body>
</html>

process.cgi CODES as follows
Code:
#!/usr/local/bin/python
import cgi
print "Content-type: text/html"
print
myform = cgi.FieldStorage()
fname = myform.getvalue('fname')
lname = myform.getvalue('lname')
email = myform.getvalue('email')
phone = myform.getvalue('phone')
saddress = myform.getvalue('saddress')
suburb = myform.getvalue('suburb')
pcode = myform.getvalue('pcode')
cardtype = myform.getvalue('cardtype')
ccname = myform.getvalue('ccname')
ccnum = myform.getvalue('ccnum')
edatemonth = myform.getvalue('edatemonth')
edateyear = myform.getvalue('edateyear')
cvv = myform.getvalue('cvv')
qnty1 = myform.getvalue('qnty1')
qnty2 = myform.getvalue('qnty2')
qnty3 = myform.getvalue('qnty3')
tot1 = myform.getvalue('tot1')
tot2 = myform.getvalue('tot2')
tot3 = myform.getvalue('tot3')
totqnty = myform.getvalue('totqnty')
totamount = myform.getvalue('totamount')

print"""
<?xml version = "1.0" encoding = "utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="http://csusap.csu.edu.au/~rgauta01/itc230/assignment1/part2/task2.css" />
 <title>Nuts 'R' Us - Shopping Cart</title>
  </head>
  <body>
<table class="table">
    <tr><td><h1> Nuts 'R' Us </h1></td></tr>
    <tr><td class="text2"> The best store in town.</td></tr>
    <tr><td>
	<table class="table2">
	<tr><td class="td1"><a href = "http://csusap.csu.edu.au/~rgauta01/itc230/assignment1/part2/main.html">  Home  </a></td><td></td>
    <td class="td1"> <a href = "http://csusap.csu.edu.au/~rgauta01/itc230/assignment1/part2/order.html">Order </a></td><td></td>
    <td class="td1"> <a href = "http://csusap.csu.edu.au/~rgauta01/itc230/assignment1/part2/cart.html">Shopping-Cart </a></td></tr>
	</table></td>
     </tr>
     <tr><td>
	<hr />
	</td></tr>
	<tr><td>
  <table class="table">
<tr><td>First Name:</td>
	<td>"""
print fname
print"""
</td></tr>
<tr><td>Last Name:</td>
	<td>"""
print lname
print"""
</td></tr>
<tr><td>email:</td>
	<td>"""
print email
print"""
</td></tr>
<tr><td>Phone:</td>
	<td>"""
print phone
print"""
</td></tr>
<tr><td>Street Address:</td>
	<td>"""
print saddress
print"""
</td></tr>
<tr><td>Suburb:</td>
	<td>"""
print suburb
print"""
</td></tr>
<tr><td>Postcode:</td>
	<td>"""
print pcode
print"""
</td></tr><tr><td colspan="2" class="text3">Payment Details</td></tr> 
<tr><td colspan="2">Type of card: &nbsp;&nbsp;"""
print cardtype
print"""
</td></tr> 
[<tr><td>Name on Credit Card:</td>
<td>"""
print ccname
print"""
</td></tr>
<tr><td>Credit Card Number</td>
<td>"""
print ccnum
print"""
</td></tr>
<tr><td colspan="2" class="text3">Expiry Date</td></tr>
<tr><td>Month(MM):</td>
<td>"""
print edatemonth
print"""
</td></tr> 
<tr><td>Year(YY):</td>
<td>"""
print edateyear
print"""
</td></tr>
<tr><td>CVV:</td>
<td>"""
print cvv
print"""
</td></tr>
<tr><td colspan="2" class="text3">Order Details</td></tr>
<tr><td colspan="2"><table class="table3">
<tr><th>Item</th>
<th>Product Code</th>
<th>Diameter</th>
<th>Length</th>
<th>Colour</th>
<th>Unit</th> 
<th>Quantity</th>
<th>Price</th></tr>
<tr><td>Bolt</td><td>B113</td>
<td>9</td><td>50</td>
<td>Black</td>
<td>2.15</td>
<td class="td1">"""
print qnty1
print"""
</td>
<td class="td1">"""
print tot1
print"""
</td></tr>
<tr><td>Nut</td>
<td>N234</td>
<td>5</td>
<td>N/A</td>
<td>Silver</td>
<td>0.45</td>
<td class="td1">"""
print qnty2
print"""
</td>
<td class="td1">"""
print tot2
print"""
</td></tr>
<tr><td>Washer</td>
<td>W359</td>
<td>8</td>
<td>N/A</td>
<td>Silver</td>
<td>0.30</td>
<td class="td1">"""
print qnty3
print"""
</td>
<td class="td1">"""
print tot3
print"""
</td></tr>

 <tr><td colspan = "6" class="td2">Grand Total:
</td><td class="td1">"""
print totqnty
print"""
</td>
<td class="td1">"""
print totamount
print"""
</td></tr>
</table></td></tr>

<tr><td colspan="2" align="center"><input type = "button"  value = "Edit" onclivk="history.back()" />&nbsp;
<input type = "button"  value = "Confirm" onclick="window.location.assign('http://csusap.csu.edu.au/~rgaota01/itc230/assignment1/part2/Checkout.html')" /></td></tr></table>

  </form>
	
	</td>
</tr>
<tr><td colspan="2">
<a href="http://validator.w3.org/check?uri=referer"><img
        src="http://www.w3.org/Icons/valid-xhtml10"
        alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
</td></tr>
<tr><td class="td1">
<hr />
&copy; Nuts 'R' Us - 2011. All Rights Reserved.
	
	</td>
</tr>

   
  </table></body>
</html>
"""