title: how to call a php function from my html form?
body: <p>I have a template for a website, and I want to  customize the message sender there. I saw <a href="http://youhack.me/2010/07/22/create-a-fancy-contact-form-with-css-3-and-jquery/" rel="nofollow">this form</a> to help out with the implementation of it. </p>
  
  <p>the php file looks like this:</p>
  
  <pre><code>&lt;?php
  echo 'testing php'; 
  $name = $_POST['name']; // contain name of person
  $email = $_POST['email']; // Email address of sender 
  $web = $_POST['web']; // Your website URL
  $body = $_POST['text']; // Your message 
  $receiver = "myEmail@hotmail.com" ; // hardcorde your email address here - This is the email address that all your feedbacks will be sent to 
  
  $body = "Name:{$name}\n\nWebsite :{$web}\n\nComments:{$body}";
  $send = mail($receiver, 'Contact Form Submission', $body, $email);
  if ($send) {
      echo 'true'; //if everything is ok,always return true , else ajax submission won't work
  }
  ?&gt;
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I've managed to call the php file like this:</p>
  
  <pre><code>&lt;form id="form" method="post" action="ajaxSubmit.php" &gt; 
                  &lt;fieldset&gt; 
                  &lt;label&gt;&lt;input type="text" id="name" name="name" value="Name" onBlur="if(this.value=='') this.value='Name'" onFocus="if(this.value =='Name' ) this.value=''"&gt;&lt;/label&gt;
                    &lt;label&gt;&lt;input type="text" id="email" name="email" value="Email" onBlur="if(this.value=='') this.value='Email'" onFocus="if(this.value =='Email' ) this.value=''"&gt;&lt;/label&gt; 
                  &lt;label&gt;&lt;input type="text" id="web" name="web" value="Phone" onBlur="if(this.value=='') this.value='Phone'" onFocus="if(this.value =='Phone' ) this.value=''"&gt;&lt;/label&gt;
                    &lt;label&gt;&lt;textarea id="text" name="text" onBlur="if(this.value==''){this.value='Message'}" onFocus="if(this.value=='Message'){this.value=''}"&gt;Message&lt;/textarea&gt;&lt;/label&gt; 
                  &lt;input type="reset" /&gt; 
                  &lt;input type="submit" /&gt; 
                  &lt;/fieldset&gt; 
                  &lt;/form&gt;
  </code></pre>
  
  <p>but when I run this I get teh following <strong>ERROR</strong></p>
  
  <pre><code>Warning: mail() [function.mail]: SMTP server response: 550 The address is not valid. in C:\wamp\www\forSale\dataTable\ajaxSubmit.php on line 17
  </code></pre>
  
  <p>but then I check the vallues of the variables, they are correct. what does that mean?</p>