Enquiry

Contact Details





Product Details

Item Size Part Code Quantity Actions





[insert_php]
if(isset($_POST[‘submit’])) {
//add_option( ‘serial_no’, ’00’, ”, ‘yes’ );
$serial_no = get_option( ‘serial_no’, ” );
$inc_serial_no = $serial_no+1;
//echo $inc_serial_no;
update_option( ‘serial_no’, $inc_serial_no, ‘no’ );
$to = “pramodpatil@hydromax.in”;
$name= $_POST[‘custname’];
$email = $_POST[‘custemail’];
$phone = $_POST[‘custphone’];
$address = $_POST[‘address’];
$subject = “Product Enquiry Mail”;
$item= $_POST[‘item’];
$size= $_POST[‘size’];
$partcode= $_POST[‘partcode’];
$quantity= $_POST[‘quantity’];
$headers = “From: “.$name.”<".$email.">“;
$headers .= “\r\nContent-Type: text/html;”;
$message = “

“;
$message .=”

“;
$si_no = 0;
//print_r($_POST); exit;
foreach($item as $a => $b){
$si_no = $a+1;
$message .= “

“;
}
$message .= “

Enquiry No. “.$inc_serial_no.” Date “.date(“d/m/Y”).”
Name “.$name.”
Email “.$email.”
Phone “.$phone.”
Address “.$address.”
Sl. No. Item Size Part Code Quantity
“.$si_no.” “.$b.” “.$size[$a].” “.$partcode[$a].” “.$quantity[$a].”

“;
//send email
mail($to, $subject, $message, $headers);
//Email response
echo “Thank you for contacting us!”;
}
[/insert_php]