Forum Moderators: coopster
Form:
<div id="frmchbox" align="left">
<input name="serv[]" type="checkbox" value="haircut" />Haircut<br />
<input name="serv[]" type="checkbox" value="hair extensions" />Hair Extensions<br />
<input name="serv[]" type="checkbox" value="color" />Color<br />
<input name="serv[]" type="checkbox" value="updo" />Updo<br />
<input name="serv[]" type="checkbox" value="conditioning" />Conditioning;
</div>
<div align="left">
<input name="serv[]" type="checkbox" value="blow&style" />Blowdry & Style<br />
<input name="serv[]" type="checkbox" value="highlights" />Highlights<br />
<input name="serv[]" type="checkbox" value="relaxer" />Relaxer<br/ >
<input name="serv[]" type="checkbox" value="braid style" />Braid Style<br/ >
</div>
</div>
and for the PHP:
<?
for($x==0;$x<count($serv);$x++){
$datosCheck.= $serv[$x]."\r\n";
}
$mensaje="";
$mensaje.="". "\n\n";
$mensaje.="Gender: ".$_POST['btngender']."\n";
$mensaje.="Name: ".$_POST['name']."\n";
$mensaje.="Phone: ".$_POST['phone']."\n";
$mensaje.="E-mail address: ".$_POST['mail']."\n";
$mensaje.="Services: ".$_POST[$datosCheck]."\n";
$mensaje.="Appointment: ".$_POST['schedule']."\n";
$mensaje.="Comments: ".$_POST['commentarea']."\n";
$mail="mcalderon@example.com";
$asunto="";
mail($mail,$asunto,$mensaje,"From: APPOINTMENTS<mcalderon@example.com>");
header("Location: index.html");
?>
The code may seem primitive, but I'm new as I said.
If anyone can give me some help would be great.
Thanks in advance.
[edited by: dreamcatcher at 2:01 pm (utc) on Nov. 19, 2007]
[edit reason] Use example.com, thanks. [/edit]
It gives me some alerts if the line commented is not, and not receive the data yet. Where I'm I going wrong?
[edited by: eelixduppy at 2:35 pm (utc) on Nov. 19, 2007]
[edit reason] exemplified code [/edit]
Done, tried to send the data from the checkboxes and the services field in the mail still appears empty.