Home Feedback Search

 

$DEBUG=0; $LOCAL=0; $action_page="place_an_order.php"; if ($DEBUG) { print "B1 = ".$B1."
\n"; foreach ($HTTP_POST_VARS as $key => $value) { print "vars[".$key."] = '".$value."'
\n"; } } if ($B1=="Send My Order") { if (($retval=validate( $HTTP_POST_VARS)) == "") { print "



Order Submitted

"; print "

Thank You ".$HTTP_POST_VARS['customer_rep']."

"; if ($LOCAL) { mail("paulf@localhost","Order", "Company = ". $HTTP_POST_VARS['Company']."\n". "Email Address = ". $HTTP_POST_VARS['email_address']."\n". "Customer rep = ". $HTTP_POST_VARS['Customer_Rep']."\n". "Telephone = ".$HTTP_POST_VARS['telephone']."\n". "Required Items = ".$HTTP_POST_VARS['required_items']."\n". "Drawings = ". $HTTP_POST_VARS['Drawings'] ."\n". "PO Number = ".$HTTP_POST_VARS['PO_Number'] ."\n". "Other Information = ".$HTTP_POST_VARS['Other_Information'] ."\n"); } else { mail("bill.cheyne@gtcgroup.co.uk.co.uk","Order", "Company = ". $HTTP_POST_VARS['Company']."\n". "Email Address = ". $HTTP_POST_VARS['email_address']."\n". "Customer rep = ". $HTTP_POST_VARS['Customer_Rep']."\n". "Telephone = ".$HTTP_POST_VARS['telephone']."\n". "Required Items = ".$HTTP_POST_VARS['required_items']."\n". "Drawings = ". $HTTP_POST_VARS['Drawings'] ."\n". "PO Number = ".$HTTP_POST_VARS['PO_Number'] ."\n". "Other Information = ".$HTTP_POST_VARS['Other_Information'] ."\n"); } print "
"; print "

"; print "

"; } else { print "
\n"; print " "; print "Data Missing - All fields must be entered
"; print "The following fields were missing $retval
"; print "
"; show_form($HTTP_POST_VARS); } } else if ($B1=="Send My Order") { show_form($HTTP_POST_VARS); } else { $HTTP_POST_VARS['Company'] = ""; $HTTP_POST_VARS['email_address'] = ""; $HTTP_POST_VARS['Customer_Rep'] = ""; $HTTP_POST_VARS['telephone'] = ""; $HTTP_POST_VARS['required_items'] = ""; $HTTP_POST_VARS['Drawings'] = ""; $HTTP_POST_VARS['PO_Number'] = ""; show_form($HTTP_POST_VARS); } function validate ($post_vars) { $retval = ""; $sep =""; if ( $post_vars['Company'] == "" ) { $retval .= "Company"; $sep = "," ; } if ($post_vars['email_address'] == "" ) { $retval .= $sep."Email Address"; $sep = "," ; } if ($post_vars['Customer_Rep'] == "" ) { $retval .= $sep."Your Name"; $sep = "," ; } if ($post_vars['telephone'] == "" ) { $retval .= $sep."Telephone"; $sep = "," ; } if ($post_vars['required_items'] == "" ) { $retval .= $sep."Required Items"; $sep = "," ; } if ($post_vars['Drawings'] == "" ) { $retval .= $sep."Drawings"; $sep = "," ; } if ($post_vars['PO_Number'] == "" ) { $retval .= $sep."Purchase Order"; $sep = "," ; } return $retval; } function show_form ($post_vars) { print "
"; print ""; print " "; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print " "; print " "; print ""; print ""; print " "; print " "; print ""; print ""; print ""; print " "; print "
All sections must be completed in order to submit this form.
Your Name
Company
E-mail address
Telephone
1.What do you wish to purchase?
2.Will drawings be included with this order?
yes    "; print " no
3.What is your purchase order number?
4.Please give all relevant additional information (sizes, marking etc.)
All sections must be completed in order to submit this form.
"; print "
"; print "
"; } ?>