Hello,
I’m a graphic designer and I was searching a quick and easy solution to a brief PHP form, when I found your tutorial “[FONT=Verdana][SIZE=4][COLOR=#003366]Contact Form - The PHP Code[/COLOR][/SIZE][/FONT]”. It’s perfect for what I’m looking for, but I need a little help to solve a problem.
In your form example, the variables are Name, Email and Message, right? Instead, mine would be 5 variables (text fields), like this:
Name
E-mail
Phone number
Date
Insurance Type
Besides, there are two checkboxes like this:
[] I’m already a Senzala Insurance Client
[] I’m already a Senzala Buildings Client
I don’t know how to include the phone number, date and insurance type on the php code, so I did like this:
<?php
if(isset($_POST[‘submit’])) {
$to = "my mail";
$subject = "Form Tutorial";
$name_field = $_POST['nome'];
$email_field = $_POST['email'];
$message = $_POST['telefone','data','tipo'];
foreach($_POST['check'] as $value) {
$check_msg .= "Checked: $value
";
}
$body = "From: $name_field
E-Mail: $email_field
Message:
$message
$check_msg";
echo "Data has been submitted to $to!";
mail($to, $subject, $body);
} else {
echo “blarg!”;
}
?>
I’m sorry, but I really don’t know how to do this… is that right? Could anybody help me, urgently?
Thanks a lot!