<!--- Get the user's contact info from database --->
<CFQUERY NAME="GetContact" DATASOURCE="#REQUEST.DataSource#">
  SELECT 
    FirstName, LastName, Address, 
    City, State, Zip, Country, Email
  FROM Contacts
  WHERE ContactID = #SESSION.Auth.ContactID#
</CFQUERY>

<CFOUTPUT>
  <CFFORM ACTION="#CGI.SCRIPT_NAME#" METHOD="POST" PRESERVEDATA="Yes">
    <INPUT TYPE="Hidden" NAME="IsPlacingOrder" VALUE="Yes">
  
    <TABLE BORDER="0" CELLSPACING="4">
      <TR>
        <TH COLSPAN="2" BGCOLOR="Silver">Shipping Information</TH>
      </TR>
    
      <TR>
        <TH ALIGN="right">Ship To:</TH>
        <TD>
          #GetContact.FirstName# #GetContact.LastName#
        </TD>
      </TR>
      <TR>
        <TH ALIGN="right">Address:</TH>
        <TD>
          <CFINPUT 
            NAME="ShipAddress" SIZE="30" 
            REQUIRED="Yes" VALUE="#GetContact.Address#"
            MESSAGE="Please don't leave the Address blank!">
        </TD>
      </TR>
      <TR>
        <TH ALIGN="right">City:</TH>
        <TD>
          <CFINPUT 
            NAME="ShipCity" SIZE="30" 
            REQUIRED="Yes" VALUE="#GetContact.City#"
            MESSAGE="Please don't leave the City blank!">
        </TD>
      </TR>
      <TR>
        <TH ALIGN="right">State:</TH>
        <TD>
          <CFINPUT 
            NAME="ShipState" SIZE="30" 
            REQUIRED="Yes" VALUE="#GetContact.State#"
            MESSAGE="Please don't leave the State blank!">
        </TD>
      </TR>
      <TR>
        <TH ALIGN="right">Postal Code:</TH>
        <TD>
          <CFINPUT 
            NAME="ShipZIP" SIZE="10" 
            REQUIRED="Yes" VALUE="#GetContact.ZIP#"
            MESSAGE="Please don't leave the ZIP blank!">
        </TD>
      </TR>
      <TR>
        <TH ALIGN="right">Country:</TH>
        <TD>
          <CFINPUT 
            NAME="ShipCountry" SIZE="10" 
            REQUIRED="Yes" VALUE="#GetContact.Country#"
            MESSAGE="Please don't leave the Country blank!">
        </TD>
      </TR>
      <TR>
        <TH ALIGN="right">Credit Card Number:</TH>
        <TD>
          <CFINPUT 
            NAME="CreditCard" SIZE="30" 
            REQUIRED="Yes" VALIDATE="creditcard"
            MESSAGE="You must provide a credit card number.">
        </TD>
      </TR>
      <TR>
        <TH ALIGN="right">Credit Card Expires:</TH>
        <TD>
          <SELECT NAME="CreditExpM">
            <CFLOOP FROM="1" TO="12" INDEX="i">
              <OPTION VALUE="#i#">#NumberFormat(i, "00")#
            </CFLOOP>
          </SELECT>
          <SELECT NAME="CreditExpY">
            <CFLOOP FROM="#Year(Now())#" TO="#Val(Year(Now())+5)#" INDEX="i">
              <OPTION VALUE="#i#">#i#
            </CFLOOP>
          </SELECT>
        </TD>
      </TR>
      <TR>
        <TH ALIGN="right">Name On Card:</TH>
        <TD>
          <CFINPUT 
            NAME="CreditName" SIZE="30" REQUIRED="Yes" 
            VALUE="#GetContact.FirstName# #GetContact.LastName#"
            MESSAGE="You must provide the Name on the Credit Card.">
        </TD>
      </TR>
      <TR VALIGN="baseline">
        <TH ALIGN="right">Confirmation:</TH>
        <TD>
          We will send a confirmation message to you at 
          #GetContact.EMail#<BR>
          <CFINPUT TYPE="Radio" NAME="HTMLMail" VALUE="Yes" CHECKED="Yes">
          HTML (I sometimes see pictures in E-mail messages)<BR>
          <CFINPUT TYPE="Radio" NAME="HTMLMail" VALUE="No">
          Non-HTML (I never see any pictures in my messages)<BR>
        </TD>
      </TR>
      <TR>
        <TD></TD>
        <TD>
          <INPUT TYPE="Submit" VALUE="Place Order Now">
        </TD>
      </TR>
    </TABLE>
    
  </CFFORM>
</CFOUTPUT>