Here is my code and my php
Code: Select all
<?php
$name=$_POST['Name'];
$address=$_POST['Address'];
$city=$_POST['City'];
$email=$_POST['Email'];
$catscale=$_POST['Cat Scale'];
$anyWayNeeded=$_POST['Any Way Needed'];
$veterinarianContact=$_POST['Veterinarian_Contact'];
$string='You selected ' . $selection . '.';
if(!filter_var($email, FILTER_VALIDATE_EMAIL))
{
die('Invalid email address.');
}
$email_from=$email;
$email_subject="Foster Form Submission";
$email_body=$string;
$to="sweettooth_dukenukem@yahoo.com";
$headers = "From: $email_from \r\n";
$headers .="Reply-To: $Email \r\n";
mail($to,$email_subject,$email_body,$headers);
?>
Here is my Code:
[text]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Iroquois County Animal Rescue</title>
<link href="external1.css" rel="stylesheet" type="text/css" media="screen" />
<link href="externalprint1.css" rel="stylesheet" type="text/css" media="print" />
<script type="text/javascript" rel="stylesheet" src="fosterValidate.js"></script>
</head>
<body>
<div class="container"><a name="top"></a>
<div class="header"><a href="../index.html"><img src="../Images/catpic.png" alt="Insert Logo Here" style="background: #C6D580; display:block;" /></a>
<!-- end .header --></div>
<div class="sidebar1">
<ul class="nav">
<li><a href="../index.html">Index</a></li>
<li><a href="about.html">About</a></li>
<li><a href="adoption.html">Adoption</a></li>
<li><a href="forms.html">Forms</a></li>
</ul>
<!-- end .sidebar1 --></div>
<div class="content">
<h1>Foster Care</h1>
<h3><i>Welcome to the ICAR foster care program.</i></h3>
<p><i>Thank you so very much for your interest in volunteering your time to improve the lives of neglected and homeless pets until an appropriate permanent home is found. Contributing to the lives of these special pets is extremely rewarding.</i></p>
<form action="FormToEmail.php" name="fosterForms" method="post" enctype="multipart/form-data" onsubmit="">
<p><br/>Name: <input name="Name" type="text" id="name" size="30" /><br />
Address: <input name="Address" type="text" id="address" size="35" /><br />
City: <input name="City" type="text" id="city" size="15" /> State: <input name="state" type="text" id="state" size="2" /> Zip: <input name="Zip" type="text" id="zip" size="10" /><br />
Home Phone: <input name="Home Phone" type="text" id="homePhone" size="15" /> Cell Phone: <input name="Cell Phone" type="text" id="Cell Phone" size="15" /><br />
Work Phone: <input name="Work Phone" type="text" id="workPhone" size="15" /> Other Phone: <input name="Other Phone" type="text" id="Other Phone" size="15" /><br />
E-mail: <input name="Email" type="text" id="email" size="30" /><br />
<br/>
In case of emergency:<br />
Name: <input name="Emergency Name" type="text" id="Emergency Name" size="25" /> Phone: <input name="Emergency Phone" type="text" id="emergencyPhone" size="15" /><br />
Name: <input type="text" name="Emergency Name 2" size="25" /> Phone: <input name="Emergency Phone 2" type="text" id="emergencyPhone2" size="15" /><br />
<br />
Please check other areas in which you would like to help:<br />
<br />
<input type="checkbox" name="Clean Cages" size="25" />Cleaning Cages/Kennels <input type="checkbox" name="Walking Dogs" size="25" />Walking Dogs<br />
<input type="checkbox" name="Socialize Cats" size="25" />Socializing Cats <input type="checkbox" name="Fundraising" size="25" />Fundraising<br />
<input type="checkbox" name="Transporting" size="25" />
Transporting
<input type="checkbox" name="Any Way Needed" size="25" />
Any Way Needed
<input type="checkbox" name="Other" size="25" />Other<br /></p>
<p><strong>Please tell us about your current pets:</strong>
<ins><ul>
<li>Name</li>
<li>Species/Breed</li>
<li>Age</li>
<li>S/N</li>
</ul></ins>
</p>
<p><textarea name="Pets" rows="5" cols="30">Enter Information...</textarea>
<br /><br />
Rabies Vaccination Date:<input type="text" name="Rabies Vaccination" size="15" /><br />
Parvo Distemper Date:<input type="text" name="Parvo Distemper" size="15" /><br />
Kennel Cough Date:<input type="text" name="Kennel Cough" size="15" /><br />
Lepto Date:<input type="text" name="Lepto" size="15" /><br />
Heartworm Preventative Type:<input type="text" name="Heartworm Preventative Type" size="15" /><br />
Date:<input type="text" name="Heartworm Preventative" size="15" /><br />
Flea Preventative Type:<input type="text" name="Flea Preventative Type" size="15" />
<br />
Date:<input type="text" name="Flea Preventative" size="15" />
</p>
<p>May we contact your veterinarian for a reference?</p>
<p><input type="radio" name="Veterinarian_Contact" value="Yes" /><label for="Vet_yes">Yes</label>
<input type="radio" name="Veterinarian_Contact" value="No" /><label for="Vet_no">No</label>
<br /><br />Name: <input type="text" name="Veterinarian Name" size="30" /><br />
Address: <input type="text" name="Veterinarian Address" size="35" /><br />
Phone: <input name="Veterinarian Phone" type="text" id="Veterinarian Phone" /><br /></p>
<p>On a scale of 1(little) to (extensive), please rank your experience/knowlege:</p>
<p>Dogs: <input type="radio" name="Dog Scale" value="1" />1
<input type="radio" name="Dog Scale" value="2" />2
<input type="radio" name="Dog Scale" value="3" />3
<input type="radio" name="Dog Scale" value="4" />4
<input type="radio" name="Dog Scale" value="5" />5</p>
<p>
Cats: <input type="radio" name="Cat Scale" value="1" />1
<input type="radio" name="Cat Scale" value="2" />2
<input type="radio" name="Cat Scale" value="3" />3
<input type="radio" name="Cat Scale" value="4" />4
<input type="radio" name="Cat Scale" value="5" />5
</p>
<p>Please explain your house-training program:</p>
<p><textarea name="House Training" rows="5" cols="30">Enter House Training Information...</textarea></p>
<p>Have you had any formal training with animals or special skills?</p>
<p><input type="radio" name="Skills" value="Yes" />Yes
<input type="radio" name="Skills" value="No" />No</p>
<p>You must accept these Terms.</p>
<p><input type="button" value="Terms" name="terms" onclick="createWindow()" /></p>
<p>Registration with state sent in with payment on:<input name="State Registration" type="text" id="State Registration" size="15" /></p>
<p><input type="submit" value="Submit" />
<input type="reset" value = "Reset" /></p>
</form>
<p><a href="#top">Back To Top</a></p>
<!-- end .content --></div>
<div class="footer">
<p>ICARe © 2010</p>
<!-- end .footer --></div>
<!-- end .container --></div>
</body>
</html>
[/text]