title: Undefined index in PHP post
body: <p>I take a form and do variable checking in jquery then pass it to a php file in ajax but I am getting this notice</p>
  
  <p>Notice: Undefined index: your_name in C:\xampp\htdocs\process.php on line 3
  something is wrong here
  Notice: Undefined index: your_email in C:\xampp\htdocs\process.php on line 7</p>
  
  <p>Here is my jquery code here</p>
  
  <pre><code>        $(".button").click(function(){
      $('.error').hide(); 
      var your_email=$("input#your_email").val(); 
      if(your_email ==""){
          $("label#youremail_error").show();  
          $("input#your_email").focus(); 
          return false; 
      }
      var your_name=$("input#your_name").val(); 
      if(your_name==""){
          $("label#yourname_error").show();
          $("input#your_name").focus(); 
          return false; 
      }
      var friends_email=$("input#friends_email").val(); 
      if(friends_email==""){
          $("label#friendsemail_error").show(); 
          $("input#friends_email").focus(); 
          return false; 
          }
      var friends_name=$("input#friends_name").val(); 
      if(friends_email==""){
          $("label#friendsname_error").show(); 
          $("input#friends_name").focus(); 
          return false;
          }
          var dataString = 'your_email=' + your_email + '&amp;friends_email=' + friends_email + '&amp;your_name=' + your_name + '&amp;friends_name=' + friends_name; 
          //alert(dataString); 
          $.ajax({
          type: "POST", 
          url:"process.php",
          data: dataString, 
          success: function(ret) {
              alert(ret); 
              //alert("thank you for signing up"); 
          },
  </code></pre>
  
  <p>and here is my PHP</p>
  
  <pre><code>   &lt;?php
  include 'inc/class.phpmailer.php';
  if(isset($_POST['your_name'])){
      $your_name=$_POST['your_name'];
      }
  else{
      echo "something is wrong with your name having:";
      var_dump($_POST['your_name']);
      echo "&lt;br/&gt;"; 
      }
  if(isset($_POST['your_email'])){
      $your_email=$_POST['your_email']; 
  }
  else{
      echo "something is wrong with your email having:";
      var_dump($_POST['your_email']); 
      echo "&lt;br/&gt;"; 
      }
  if(isset($_POST['friends_name'])){
      $friends_name=$_POST['friends_name']; 
      }
  else{
      echo "something is wrong with friends name having:"; 
      var_dump($_POST['friends_name']);
      echo "&lt;br/&gt;"; 
      }
  </code></pre>
  
  <p>I am not sure why I am getting this notice 
  Apparently my $_POST values are not set.<br>
  I am at my wits end with this one.  Do you know why/when a $_POST is not set? </p>