Hello, im very new to php.
Ive created a form in dreamweaver using Tick boxes and normal text boxes.
I need the form to send to a email, the tutorials ive read dont usually encorperate tick boxes.

here is the form

<form name="contactform" method="post" action="send_form_email.php">
<table width="450px">
<tr>
  <td valign="top">Personal Details</td>
  <td valign="top">&nbsp;</td>
</tr>
<tr>
  <td valign="top">Full Name</td>
  <td valign="top"><input  type="text" name="full_name" maxlength="50" size="30"></td>
</tr>
<tr>
  <td valign="top">Date Of Birth</td>
  <td valign="top"><input  type="text" name="date_of_birth" maxlength="50" size="30"></td>
</tr>
<tr>
  <td valign="top">Home Number</td>
  <td valign="top"><input  type="text" name="home_number" maxlength="50" size="30"></td>
</tr>
<tr>
  <td valign="top">Mobile Number</td>
  <td valign="top"><input  type="text" name="mobile_number" maxlength="50" size="30"></td>
</tr>
<tr>
  <td valign="top">&nbsp;</td>
  <td valign="top">&nbsp;</td>
</tr>
<tr>
  <td valign="top">Address</td>
  <td valign="top"><textarea name="address" cols="30" rows="5"></textarea></td>
</tr>
<tr>
  <td valign="top">Check boxes that apply</td>
  <td valign="top">&nbsp;</td>
</tr>
<tr>
  <td valign="top">Disablities</td>
  <td valign="top"><input type="checkbox" name="disablities" id="disablities"></td>
</tr>
<tr>
  <td valign="top">Any health issues</td>
  <td valign="top"><input type="checkbox" name="health_issues" id="health_issues"></td>
</tr>
<tr>
  <td valign="top">Smoker</td>
  <td valign="top"><input type="checkbox" name="smoker" id="smoker"></td>
</tr>
<tr>
 <td valign="top">Driving license</td>
 <td valign="top"><input type="checkbox" name="driving_license" id="driving_license"></td>
</tr>
<tr>
 <td valign="top"">Can you supply References</td>
 <td valign="top"><input type="checkbox" name="references" id="references"></td>
</tr>
<tr>
 <td height="52" valign="top"><p>&nbsp;</p>
   <p>Employment History</p></td>
 <td valign="top">
   <p>&nbsp;</p>
   <p>&nbsp;</p>
 </td>
</tr>
<tr>
  <td valign="top">Company name</td>
  <td valign="top"><input  type="text" name="company_name" maxlength="30" size="30"></td>
</tr>
<tr>
  <td valign="top">Posistion Held</td>
  <td valign="top"><input  type="text" name="position" maxlength="30" size="30"></td>
</tr>
<tr>
 <td valign="top"><p align="left">Duties involved</p></td>
 <td valign="top">
   <p>
     <textarea  name="duties" maxlength="1000" cols="25" rows="6"></textarea>
   </p></td>
</tr>
<tr>
  <td height="22" valign="top">&nbsp;</td>
  <td valign="top">&nbsp;</td>
</tr>
<tr>
  <td height="24" valign="top">Company name</td>
  <td valign="top"><input  type="text" name="company_name2" maxlength="30" size="30"></td>
</tr>
<tr>
  <td height="24" valign="top">Posistion Held</td>
  <td valign="top"><input  type="text" name="position2" maxlength="30" size="30"></td>
</tr>
<tr>
  <td height="21" valign="top">Duties involved</td>
  <td valign="top"><textarea  name="duties2" maxlength="1000" cols="25" rows="6"></textarea></td>
</tr>
<tr>
  <td height="21" valign="top">&nbsp;</td>
  <td valign="top">&nbsp;</td>
</tr>
<tr>
  <td height="21" valign="top">Company name</td>
  <td valign="top"><input  type="text" name="company_name3" maxlength="30" size="30"></td>
</tr>
<tr>
  <td height="21" valign="top">Posistion Held</td>
  <td valign="top"><input  type="text" name="position3" maxlength="30" size="30"></td>
</tr>
<tr>
  <td height="21" valign="top">Duties involved</td>
  <td valign="top"><textarea  name="duties3" maxlength="1000" cols="25" rows="6"></textarea></td>
</tr>
<tr>
  <td height="61" valign="top"><p>&nbsp;</p>
    <p>Education</p></td>
  <td valign="top">&nbsp;</td>
</tr>
<tr>
  <td height="26" valign="top">School / College / University</td>
  <td valign="top"><input  type="text" name="study_where" maxlength="30" size="30"></td>
</tr>
<tr>
  <td height="25" valign="top">Qualifications</td>
  <td valign="top"><input  type="text" name="Qualifications" maxlength="30" size="30"></td>
</tr>
<tr>
  <td height="46" valign="top">&nbsp;</td>
  <td valign="top">&nbsp;</td>
</tr>
<tr>
  <td height="46" valign="top"><p>School / College / University</p></td>
  <td valign="top"><input  type="text" name="study_where2" maxlength="30" size="30"></td>
</tr>
<tr>
  <td height="26" valign="top">Qualifications</td>
  <td valign="top"><input  type="text" name="Qualifications2" maxlength="30" size="30"></td>
</tr>
<tr>
  <td height="36" valign="top">&nbsp;</td>
  <td valign="top">&nbsp;</td>
</tr>
<tr>
  <td height="25" valign="top"><p>School / College / University</p></td>
  <td valign="top"><input  type="text" name="study_where3" maxlength="30" size="30"></td>
</tr>
<tr>
  <td height="27" valign="top">Qualifications</td>
  <td valign="top"><input  type="text" name="Qualifications3" maxlength="30" size="30"></td>
</tr>
<tr>
  <td height="69" valign="top">Any other Qualifications
    <p>&nbsp;</p></td>
  <td valign="top"><textarea name="other_qualifications" cols="40" rows="7"></textarea></td>
</tr>
<tr>
  <td height="41" valign="top"><p>&nbsp;</p>
    <p>Hobbies / Interests </p></td>
  <td valign="top">&nbsp;</td>
</tr>
<tr>
  <td height="21" valign="top"><p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>Tell us abit about yourself</p></td>
  <td valign="top"><textarea name="abit_about_you" cols="40" rows="10">Please go into as much detail as possible so I can learn a little bit about you.

Then please tell me what you have to offer, do you like a challenge, do you prefer to work on your own or as part of a team. Are you trustworthy, reliable? Are you good at problem solving etc.</textarea></td>
</tr>
<tr>
  <td height="85" colspan="2" style="text-align:center"><p>
    <input type="submit" value="Submit">
  </p>
    <p align="left">Don’t worry if this questionnaire seems a little daunting. I am here to help you every step of the way. In the end we will have a very straightforward professional CV.</p>
    <p align="left">Any problems you can email me info@cvservicesforyou.co.uk </p>
    <p>&nbsp; </p></td>
</tr>
</table>
</form>

Where do i start any usefull links that will help.

Thanks Gazza

Recommended Answers

All 2 Replies

Regarding the checkboxes (or tick boxes, as you call them):

when processing the posted values you have to check for an existence of a value of each checkbox. If the check box was not clicked, the value does not exist in the $_POST array.

if(isset($_POST['disabilities'])) {
    $disabilities = 'Yes';
} else {
    $disabilities = 'No';
}

Hope this helps.

Also see this link: http://www.html-form-guide.com/php-form/php-form-checkbox.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.