Request Information

If you are interested in more infomation about one of our products, please complete the form below and we will contact you with the requested information.

* Indicates a required field

*Name:
*Company or Home Owner:
*Email Address:
 Phone Number:
 Product You Are Inquiring About: END; //require('../inc/config.php'); // already included by the template, so not needed here $table = 'inventory_categories'; // Connect to the database if (!($connection = mysql_connect('localhost', $username, $password))) showerror(); // Select the correct database if (!(mysql_select_db($database, $connection))) showerror(); if (!$result = mysql_query("SELECT * FROM $table ORDER BY id", $connection)) mysql_error(); if (@ mysql_num_rows($result) != 0) { print "\n"; } print <<
 
END; } else if ($action == 'post') { print '

Request Information

'; // Check info $num_bad = 0; $not_entered_text = ''; if (!preg_match("/\S+/", $HTTP_POST_VARS["name"])) { $num_bad++; $not_entered_text = 'Name'; } if (!preg_match("/\S+/", $HTTP_POST_VARS["company"])) { $num_bad++; if ($not_entered_text != '') $not_entered_text .= ', '; $not_entered_text .= 'Company or Home Owner'; } if (!preg_match("/\S+/", $HTTP_POST_VARS["email"])) { $num_bad++; if ($not_entered_text != '') $not_entered_text .= ', '; $not_entered_text .= 'Email'; } if ($num_bad) { print "

Your request could not be submitted, because you did not complete the following fields: $not_entered_text.

"; print '

Please go back and complete the required field'; if ($num_bad > 1) print 's'; print '.

'; } else { $msg_body = "A user at mpi-austin.com requested more information:\n\n"; $msg_body .= "Name: {$HTTP_POST_VARS["name"]}\n"; $msg_body .= "Company or Home Owner: {$HTTP_POST_VARS["company"]}\n"; $msg_body .= "Email: {$HTTP_POST_VARS["email"]}\n"; $msg_body .= "Phone: {$HTTP_POST_VARS["phone"]}\n"; $msg_body .= "Product: {$HTTP_POST_VARS["product"]}\n"; mail($request_email, 'MPI-Austin.com: Information Request', $msg_body); print '

Request submitted. You will be contacted shortly with an answer to your question.

'; } } else { print '

Request Information

'; print '

Invalid action.

'; } ?>