hi all newbie here
i have a contact form working nicely except the checkboxes.
any help is very appreciated
the html:
<form id="contact" method="post" action="">
<fieldset>
<label for="name">Name</label>
<input type="text" name="name" placeholder="Full Name" title="Enter your name" class="required">
<label for="phone">Contact numbers</label>
<input type="tel" name="phone" placeholder="ex. (5555) 555-555">
<label for="email">E-mail</label>
<input type="email" name="email" placeholder="[email protected]" title="Enter your e-mail address" class="required email">
<label for="besttime">Best time to contact me</label>
<input type="text" name="besttime" placeholder="morning/afternoon/evening">
<label for="postcode">Post code of property to be surveyed</label>
<input type="text" name="postcode" placeholder="">
<label for="propertytype">Type of property</label>
<input type="text" name="propertytype" placeholder="house/flat">
<label for="bedrooms">Number of bedrooms</label>
<input type="number" name="bedrooms" placeholder="1,2,3,4,5,6,etc">
<label for="enquiry">Nature of enquiry</label>
<textarea name="enquiry"></textarea>
<h4>Services required</h4>
<input type="checkbox" name="services" value="onsiteadvice" /> Onsite advice<br />
<input type="checkbox" name="services" value="fullsurvey" /> Full survey & written report<br />
<input type="checkbox" name="services" value="data" /> Data logging service<br />
<input type="checkbox" name="services" value="mouldcontrol" /> Mould control / products<br />
<input type="checkbox" name="services" value="productinformation" /> Product information from site<br />
<input type="checkbox" name="services" value="ventilation" /> Ventilation advice<br />
<input type="checkbox" name="services" value="mouldswabs" /> Mould swabs<br />
<input type="checkbox" name="services" value="notsure" /> Not sure
<label for="message">Any other information</label>
<textarea name="message"></textarea>
<input type="submit" name="submit" class="button" id="submit" value="Send Message" />
</fieldset>
</form>
hereās the process.php file:
[php]
<?php // Get Data $name = strip_tags($_POST['name']); $phone = strip_tags($_POST['phone']); $email = strip_tags($_POST['email']); $besttime = strip_tags($_POST['besttime']); $postcode = strip_tags($_POST['postcode']); $propertytype = strip_tags($_POST['propertytype']); $bedrooms = strip_tags($_POST['bedrooms']); $enquiry = strip_tags($_POST['enquiry']); $onsiteadvice = strip_tags($_POST['services']); $fullsurvey = strip_tags($_POST['services']); $data = strip_tags($_POST['services']); $mouldcontrol = strip_tags($_POST['services']); $productinformation = strip_tags($_POST['services']); $ventilation = strip_tags($_POST['services']); $mouldswabs = strip_tags($_POST['services']); $notsure = strip_tags($_POST['services']); $message = strip_tags($_POST['message']); // Send Message mail( "[email protected]", "Contact Form", "Name: $name\nPhone: $phone\nEmail: $email\nBestime: $besttime\nPostcode: $postcode\nPropertytype: $propertytype\nBedrooms: $bedrooms\nEnquiry: $enquiry\nServices: $onsiteadvice\nFullsurvey: $services\nData: $services\nMouldcontrol: $services\nProductinformation: $services\nVentilation: $services\nMouldswabs: $services\nNotsure: $services\nMessage: $message\n", "From: Forms " ); ?>[/php]