close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

contact form not sending checkbox

Thread began 5/02/2012 3:48 am by shanebrough438709 | Last modified 3/05/2015 11:49 am by shanebrough438709 | 11003 views | 15 replies

shanebrough438709

contact form not sending checkbox

Hi im having a problem with a website im building and testing.
in the contact form when i fill out the form and check some of the checkboxes, i recieve a email with the form info but the check boxes are empty.
can anyone help??

Also just discovered my selectable dropdown menu is only sending 1 of the selected items

Thanks in advance

html code:

<th>Membership * </th>
<td>
<input type="checkbox" name="membership[]" value="ecssa">ECSSA<br />
<input type="checkbox" name="membership[]" value="psa">PSA<br />
<input type="checkbox" name="membership[]" value="nsai">NSAI<br />
<input type="checkbox" name="membership[]" value="eqa">EQA<br />
<input type="checkbox" name="membership[]" value="Other">
Others (Fill Below) <br />
</td></tr>

contact php:

<?php
$field_name = $_POST['cf_name'];
$field_phone = $_POST['cf_phone'];
$field_mobile = $_POST['cf_mobile'];
$field_email = $_POST['cf_email'];
$field_company = $_POST['cf_company'];
$field_services = $_POST['services[]'];
$field_other = $_POST['cf_other'];
$field_areas = $_POST['cf_areas'];
$field_membership = $_POST['membership[]'];
$field_othermember = $_POST['cf_othermember'];
$field_job = $_POST['cf_job'];
$field_leads = $_POST['leads[]'];
$field_agree = $_POST['agree[]'];


$mail_to = 'Removed';
$subject = 'Message from a site visitor '.$field_name;

$body_message = 'From: '.$field_name."\n";
$body_message .= 'E-mail: '.$field_email."\n";
$body_message .= 'Phone Number: '.$field_phone;
$body_message .= 'Mobile: '.$field_mobile;
$body_message .= 'Company Name: '.$field_company;
$body_message .= 'Services offered: '.$field_services;
$body_message .= 'Other Services: '.$field_other;
$body_message .= 'Areas will Work: '.$field_areas;
$body_message .= 'Membera of: '.$field_membership;
$body_message .= 'Other Membership: '.$field_othermember;
$body_message .= 'Job Min Value: '.$field_job;
$body_message .= 'Recieve leads: '.$field_leads;
$body_message .= 'Agree to terms: '.$field_agree;

$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message\n $check_msg";

$headers = 'From: '.$field_email."\r\n";
$headers .= 'Reply-To: '.$field_email."\r\n";

$mail_status = mail($mail_to, $subject, $body_message, $headers);

if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
alert('Thank you for the message. We will contact you shortly.');
window.location = 'index.html';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Message failed. Please, send an email to removed');
window.location = 'index.html';
</script>
<?php
}
?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...