background
Aboutproduct
Products | Vendors | Quote
// Function to display form function showForm($errorFirstName=false,$errorLastName=false,$errorPhone=false,$errorEmail=false,$errorMesg=false){ if ($errorFirstName) $errorTextFirstName = "Please enter your first name!"; if ($errorLastName) $errorTextLastName = "Please enter your last name!"; if ($errorPhone) $errorTextPhone = "Please enter a phone number!"; if ($errorEmail) $errorTextEmail = "Please enter a valid email address!"; echo '
Customer Information
'; // Display organization field echo ''; // Display first name field an error if needed echo ''; // Display last name field an error if needed echo ''; // Display phone field an error if needed echo ''; // Display email field an error if needed echo '
(*Required Fields)
Organization
First Name *
'; if ($errorFirstName) echo "
$errorTextFirstName"; echo '
 Last Name *
'; if ($errorLastName) echo "
$errorTextLastName"; // Display address fields echo '
Address
 Suite
City
State     Zip
     
Phone *
'; if ($errorPhone) echo "
$errorTextPhone"; // Display fax and cell fields echo '
Fax
Cell Phone
Email *
'; if ($errorEmail) echo "
$errorTextEmail"; // Display the rest of the form echo '

Please select the Products and Services you are looking for: (Select all that apply.)
Products
Plywood:
Southern Yellow Pine
Doug Fir
Fire Treated
ACQ Plywood
Hardwood
Oak
Birch
Luan
Wiggle Board
Melamine
Slot Wall
Peg Board
MDF
Hard Boards
  Interior Products:
Standard Eastern White Pine S4S
Premium Eastern White Pine S4S
C+ Better Select
Russian Pine 2+ Better
SYP Wainscotting
SYP Stepping
SYP Flooring
Ceiling Tiles
Ceiling Grid Donn
Plaster
Structolite
Durock & Related Products
Compound
Sheetrock
Glassrock
Drywall
     
Studs & Lumber:
Green Doug Fir
Hemlock Fir
K D S-P-F
ACQ Treated
Furring Stips
Dimensional
Under Course Shingles
  Metal Products:
25 Guage Metal studs and track
Wire Lathe
Flex Track
Corner Bead (8 & 10ft)
J Bead
L Bead
Related Bead Products
     
Cement Products:
Ace Crete Products
Sand Mix
Gravel Mix
Mortar Mix
Specialty Brands
Portland Cement, Type 1
Mortar Cement
Rainbow Cement Colors
Empire Blended Specialty
  Roofing Products:
Gardner-Gibson Roof Products
Roof Coating
Roof Cement
Roof Flashing
#90 Black Roof Paper
#90 White Roof Paper
#15 Felt Paper
#30 Felt Paper
     
Insulation:
Sound Board
Guardian Insulation
Therma Fiber
  Composite Products:
Monarch
Composite Decking
Railing
White & Earth Tone
Millennium
 
Request a Quote
   
Please have a Sales Representative contact me.
   

Comments/Quote Request Information


'; } if (!isset($_POST['SubmitForm'])) { showForm(); } else { //Init error variables $errorFirstName = false; $errorLastName = false; $errorPhone = false; $errorEmail = false; /*EDIT SECTION*/ $hudson = "Hudson Interior Supply"; $location = "chris@psidistributors.com"; $cc = "nkraus@krausgoupmarketing.com"; /*END EDIT SECTION*/ $subject = "$hudson: Contact/Request Form"; $FirstName = isset($_POST['firstName']) ? trim($_POST['firstName']) : ''; $LastName = isset($_POST['lastName']) ? trim($_POST['lastName']) : ''; $phone = isset($_POST['phone']) ? trim($_POST['phone']) : ''; $email = isset($_POST['email']) ? trim($_POST['email']) : ''; $organization = $_POST['organization']; $address = $_POST['address']; $suite = $_POST['suite']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $checkContactMe = $_POST['checkContactMe']; if (strlen($_POST['comments'])<1) { $comments = "None"; } else { $comments = $comments; } if (strlen($_POST['cellPhone'])<1) { $cellPhone = "None"; } else { $cellPhone = $cellPhone; } if (strlen($_POST['fax'])<1) { $fax = "None"; } else { $fax = $fax; } if (strlen($_POST['checkQuote'])<1) { $checkQuote = "No"; } else { $checkQuote = $checkQuote; } if (strlen($_POST['checkContactMe'])<1) { $checkContactMe = "No"; } else { $checkContactMe = $checkContactMe; } if (strlen($_POST['checkDW'])<1) { $checkDW_msg = "None\n"; } else { foreach($_POST['checkDW'] as $value1) { $checkDW_msg .= "$value1\n"; } } if (strlen($_POST['checkJT'])<1) { $checkJT_msg = "None\n"; } else { foreach($_POST['checkJT'] as $value2) { $checkJT_msg .= "$value2\n"; } } if (strlen($_POST['checkSFS'])<1) { $checkSFS_msg = "None\n"; } else { foreach($_POST['checkSFS'] as $value3) { $checkSFS_msg .= "$value3\n"; } } if (strlen($_POST['checkLP'])<1) { $checkLP_msg = "None\n"; } else { foreach($_POST['checkLP'] as $value4) { $checkLP_msg .= "$value4\n"; } } if (strlen($_POST['checkServ'])<1) { $checkServ_msg = "None\n"; } else { foreach($_POST['checkServ'] as $value5) { $checkServ_msg .= "$value5\n"; } } $to = "$location, $cc"; $body = "Organization:\n$organization\n\nFrom:\n$FirstName $LastName\n <$email>\n\nAddress:\n$address\n$suite\n$city, $state $zip\n\nPhone: $phone\nFax: $fax\nMobile: $cellPhone\n\nPlease Contact: $checkContactMe\n\nQuote Requested: $checkQuote\n\nDrywall:\n$checkDW_msg\nJoint Treatment, etc.:\n$checkJT_msg\nSteel Framing System:\n$checkSFS_msg\nLumber and Plywood:\n$checkLP_msg\nServices:\n$checkServ_msg\n\nMessage:\n$comments\n\n"; $body_thankYou = "Dear $FirstName $LastName,\n\nThank you for contacting us through the $subject portal. We will respond to your request in a timely manner. Please review the information you supplied below. Email $location to correct any information or simply add additional comments.\n\nThank you for choosing $hudson.\n\nSUPPLIED INFORMATION\nOrganization:\n$organization\n\nFrom:\n$FirstName $LastName\n<$email>\n\nAddress:\n$address\n$suite\n$city, $state $zip\n\nPhone: $phone\nFax: $fax\nMobile: $cellPhone\n\nPlease Contact: $checkContactMe\n\nQuote Requested: $checkQuote\n\nDrywall:\n$checkDW_msg\nJoint Treatment, etc.:\n$checkJT_msg\nSteel Framing System:\n$checkSFS_msg\nLumber and Plywood:\n$checkLP_msg\nServices:\n$checkServ_msg\n\nMessage:\n$comments\n\n"; if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) $errorEmail = true; if (strlen($FirstName)<3) $errorFirstName = true; if (strlen($LastName)<3) $errorLastName = true; if (strlen($phone)<10) $errorPhone = true; // Display the form again as there was an error if ($errorFirstName || $errorLastName || $errorPhone || $errorEmail) { showForm($errorFirstName,$errorLastName,$errorPhone,$errorEmail); } else { mail($to, $subject, $body); mail($email, $subject, $body_thankYou); echo 'Email was sent successfully!'; showForm(); } }