Marcar checkbox en formulario y recibir por email
Buenas, tengo un formulario simple con checkbox de este tipo:
<fieldset class="radio">
<label for="healthA">
<input id="healthA" name="card1" type="checkbox" >Health insurance </label>
<label for="lifeInsuranceB">
<input id="lifeInsuranceB" name="card1" type="checkbox" > Life Insurance </label>
<label for="dentalC">
<input id="dentalC" name="card2" type="checkbox" > Dental </label>
<label for="longTermD">
<input id="longTermD" name="card1" type="checkbox" > Term Care Long </label>
<label for="healthE">
<input id="healthE" name="card3" type="checkbox" >Health insurance </label>
</fieldset>
Los resultados los recibo en texto plano en mi email:
mi php esta de la sgte manera:
<?php
$to = $_REQUEST['sendto'] ;
$to = "[email protected]";
$from = $_REQUEST['Email'] ;
$firstName = $_REQUEST['firstName'] ;
$headers = "From: $from";
$subject = "BCA Contact Form";
$fields = array();
$fields{"firstName"} = "firstName";
$fields{"lastName"} = "lastName";
$fields{"Company"} = "Company";
$fields{"Phone"} = "Phone";
$fields{"Email"} = "Email";
$fields{"County"} = "County";
$fields{"employees"} = "employees";
$fields{"healthA"} = "healthA";
$fields{"lifeInsuranceB"} = "lifeInsuranceB";
$fields{"dentalC"} = "dentalC";
$fields{"longTermD"} = "longTermD";
$fields{"healthE"} = "healthE";
$fields{"lifeInsuranceF"} = "lifeInsuranceF";
$fields{"longTdiG"} = "longTdiG";
$fields{"NYSdisH"} = "NYSdisH";
$fields{"retI"} = "retI";
$fields{"healthyStaffJ"} = "healthyStaffJ";
solo recibo lo sgte en mi correo:
firstName: Miker
lastName: Flores
Company: Pixel
Phone: 623748
Email: [email protected]
County: Lima
employees: 10
healthA:
lifeInsuranceB:
dentalC:
longTermD:
healthE:
lifeInsuranceF:
longTdiG:
NYSdisH:
retI:
healthyStaffJ:
Como puedo arreglarlo para poder recibir la data por email?
Muchas gracias!
<fieldset class="radio">
<label for="healthA">
<input id="healthA" name="card1" type="checkbox" >Health insurance </label>
<label for="lifeInsuranceB">
<input id="lifeInsuranceB" name="card1" type="checkbox" > Life Insurance </label>
<label for="dentalC">
<input id="dentalC" name="card2" type="checkbox" > Dental </label>
<label for="longTermD">
<input id="longTermD" name="card1" type="checkbox" > Term Care Long </label>
<label for="healthE">
<input id="healthE" name="card3" type="checkbox" >Health insurance </label>
</fieldset>
Los resultados los recibo en texto plano en mi email:
mi php esta de la sgte manera:
<?php
$to = $_REQUEST['sendto'] ;
$to = "[email protected]";
$from = $_REQUEST['Email'] ;
$firstName = $_REQUEST['firstName'] ;
$headers = "From: $from";
$subject = "BCA Contact Form";
$fields = array();
$fields{"firstName"} = "firstName";
$fields{"lastName"} = "lastName";
$fields{"Company"} = "Company";
$fields{"Phone"} = "Phone";
$fields{"Email"} = "Email";
$fields{"County"} = "County";
$fields{"employees"} = "employees";
$fields{"healthA"} = "healthA";
$fields{"lifeInsuranceB"} = "lifeInsuranceB";
$fields{"dentalC"} = "dentalC";
$fields{"longTermD"} = "longTermD";
$fields{"healthE"} = "healthE";
$fields{"lifeInsuranceF"} = "lifeInsuranceF";
$fields{"longTdiG"} = "longTdiG";
$fields{"NYSdisH"} = "NYSdisH";
$fields{"retI"} = "retI";
$fields{"healthyStaffJ"} = "healthyStaffJ";
solo recibo lo sgte en mi correo:
firstName: Miker
lastName: Flores
Company: Pixel
Phone: 623748
Email: [email protected]
County: Lima
employees: 10
healthA:
lifeInsuranceB:
dentalC:
longTermD:
healthE:
lifeInsuranceF:
longTdiG:
NYSdisH:
retI:
healthyStaffJ:
Como puedo arreglarlo para poder recibir la data por email?
Muchas gracias!
1 respuesta
Respuesta de Jorge Vila
1