does anybody know how to add the result of a radio check button onto a php file, so that it gets included in the contents of the email.
i've got a form on my website with a radio check button, that it used to say whether the billing details are the same as the shipping details, but i dont know how to transfer that into the email that gets sent to me when the submit button is pressed.
the php file is as follows:
<?
$fmt_Response=implode("", file("thanks.htt"));
$fmt_Mail=implode("", file("mail.htt"));
while(list($Key, $Val)= each($HTTP_POST_VARS)) {
$fmt_Response=str_replace("{$Key}", $Val, $fmt_Response);
$fmt_Mail=str_replace("{$Key}", $Val, $fmt_Mail);
}
$description = $HTTP_POST_VARS["description"];
$price = $HTTP_POST_VARS["price1"];
$quantity = $HTTP_POST_VARS["qty"];
$order_sub_total = $HTTP_POST_VARS["ordersub"];
$postage_and_packaging = $HTTP_POST_VARS["pandp"];
$order_grand_total = $HTTP_POST_VARS["ordergrandtotal"];
$ship_name = $HTTP_POST_VARS["ship_name"];
$ship_address = $HTTP_POST_VARS["ship_address"];
$ship_city = $HTTP_POST_VARS["ship_city"];
$ship_area = $HTTP_POST_VARS["ship_area"];
$ship_postcode = $HTTP_POST_VARS["ship_postcode"];
$ship_country = $HTTP_POST_VARS["ship_country"];
$ship_phone_number = $HTTP_POST_VARS["ship_phone"];
$ship_email = $HTTP_POST_VARS["ship_email"];
$bill_name = $HTTP_POST_VARS["bill_name"];
$bill_address = $HTTP_POST_VARS["bill_address"];
$bill_city = $HTTP_POST_VARS["bill_city"];
$bill_area = $HTTP_POST_VARS["bill_area"];
$bill_postcode = $HTTP_POST_VARS["bill_postcode"];
$bill_country = $HTTP_POST_VARS["bill_country"];
$bill_phone_number = $HTTP_POST_VARS["bill_phone"];
$bill_email = $HTTP_POST_VARS["bill_email"];
$card_type = $HTTP_POST_VARS["card_type"];
$cardholder_name = $HTTP_POST_VARS["card_name"];
$card_number = $HTTP_POST_VARS["card_number"];
$card_check_number = $HTTP_POST_VARS["card_check_no"];
$card_valid_from_issue_number = $HTTP_POST_VARS["card_value_issue_no"];
$mailText = "$fmt_Mail \n\t
Order Details: \n\t
Qty: $quantity \n\t
Postage & Packaging: $postage_and_packaging \n\t
Order Total: $order_grand_total \n\t
Shipping Information: \n\t
Name: $ship_name \n\t
Address: $ship_address \n\t
City: $ship_city \n\t
Area: $ship_area \n\t
Postcode: $ship_postcode \n\t
Country: $ship_country \n\t
Phone Number: $ship_phone_number \n\t
Email: $ship_email \n\t
Billing Details: \n\t
Name: $bill_name \n\t
Address: $bill_address \n\t
City: $bill_city \n\t
Area: $bill_area \n\t
Postcode: $bill_postcode \n\t
Country: $bill_country \n\t
Phone Number: $bill_phone_number \n\t
Email: $bill_email \n\t
Credit Card Details: \n\t
Card Type: $card_type \n\t
Cardholder Name: $cardholder_name \n\t
Card Number: $card_number \n\t
Card Check Number: $card_check_number \n\t
Valid From Date/Issue Number (switch only): $card_valid_from_issue_number \n\t";
mail($HTTP_POST_VARS["recipient"], $HTTP_POST_VARS["subject"], $mailText );
echo $fmt_Response;
?>
the radio check button is as follows:
<NOBR><INPUT TYPE="checkbox" CHECKED NAME="Bill Address same" VALUE="" >Check if same as shipping address</NOBR>
anyhelp would be greatly appreicated.