title: Undefined index: email in C:\wamp\www\emailvalidate.php on line 4
body: <p>I am new to Ajax. In my Ajax I get the following error message :</p>
  
  <blockquote>
    <p>Notice: Undefined index: address in C:\wamp\www\test\sample.php on
    line 4</p>
  </blockquote>
  
  <p>I googled but I didn't get a solution for my specified issue.  </p>
  
  <p>Here is what I did.</p>
  
  <p><strong>HTML Form with Ajax (test1.php)</strong></p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  
  &lt;script&gt;
  function loadXMLDoc()
  {
  var xmlhttp;
  if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
      {
      document.getElementById("mydiv").innerHTML=xmlhttp.responseText;
      }
    }
  xmlhttp.open("POST","test2.php",true);
  xmlhttp.send();
  }
  &lt;/script&gt;
  
  
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;form id="form1" name="form1" method="post" action="test2.php"&gt;
    &lt;p&gt;
      &lt;label for="address"&gt;&lt;/label&gt;
      &lt;input type="text" name="address" id="address" onblur="loadXMLDoc()"  /&gt;
      &lt;input type="submit" name="submit" id="submit" value="Submit" /&gt;
    &lt;/p&gt;
    &lt;p&gt;&lt;div id = 'mydiv'&gt;&lt;/div&gt;&lt;/p&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>test2.php</strong></p>
  
  <pre><code> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;?php
  echo "Your Address is ".$_POST['address'];
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am sure it is very simple issue but I don't know how to solve it.  Any help ?</p>