title: Is there a way I can find out if my data string is being passed on to my php function
body: <p>I am calling a ajax form submit script as given below :</p>
  
  <pre><code>$(function() {
    $('.simple-success').hide();
    $("#submit_button").click(function() {
  
  
          var firstname=$("input#Firstname").val();
          var lastname=$("input#Lastname").val();
          var email = $("input#email").val();
          var title = $("input#title").val();
          var organization = $("input#organization").val();
  
  
  
  
  var dataString = 'firstname='+ firstname + '&amp;lastname=' + lastname + '&amp;email=' + email + '&amp;title=' + title + '&amp;organization=' + organization;  
  
  
              $.ajax({
        type: "POST",
        url: "optIn.php",
        data: dataString,
        success: function() {
            $('.emailform').fadeOut(100).hide();
          $('.simple-success').fadeIn(100).show();
           alert('sucess')
  
        }
       });
      return false;
      });
  });
  </code></pre>
  
  <p>The script is pulling in the data from the form as I am able to view the data in an alert of the datastring.However for some odd reason the data never gets sent on to the database even though the PHP script seems correct. The PHP script is given below</p>
  
  <pre><code>&lt;?php
  
  
      $firstname = stripslashes(strip_tags($_POST['firstname']));
  
      $lastname = stripslashes(strip_tags($_POST['lastname']));
      $email = stripslashes(strip_tags($_POST['email']));
      $title = stripslashes(strip_tags($_POST['title']));
      $organization = stripslashes(strip_tags($_POST['organization']));
  
  
  $pdbHost = "localhost";
  $pdbUserName = "******";
  $pdbPassword = "******";
  $pdbName     = "db1080824_emails";
  
  
  
  //  Connect to mySQL
  $conlink = mysql_connect($pdbHost, $pdbUserName, $pdbPassword);
  if(!$conlink) {die('Unable to connect to '.$pdbHost);}
  if (!mysql_select_db($pdbName, $conlink)){die('Cannot find database '.$pdbName);}
  
  //SQL query
  
      $SQL2="INSERT INTO  `db1080824_emails`.`emails` (`record_id` ,`firstname`,`lastname`,`email`,`title`,`organization`)VALUES (NULL ,  '".$firstname."',  '".$lastname."',  '".$email."',  '".$title."',  '".$organization."')";
  
      mysql_query($SQL2);
  //  Connect to Closing the connection
  mysql_close($conlink);
  ?&gt;
  </code></pre>
  
  <p>The mysql server is located on the server and the database with tables has been created,so I am not sure whats going wrong here</p>
  
  <p>Any inputs would be great</p>