title: Jquery Ajax not working on server but working on localhost
body: <p>I have the following jquery code that posts data to a php file and works fine on localhost. But when this code is now on the server the script returns an error instead of data.</p>
  
  <pre><code>  $.ajax({
          type: 'POST',
          url: 'scripts/info.php',
          data: {
  
              accountNumber: accountNumber,
              agentName: name
  
          },
          success: function( data ) {
              alert(data)
          },
          error: function(xhr, status, error) {
              // check status &amp;&amp; error
              alert(status)
          }
      });
  </code></pre>
  
  <p>This is the code in the php file that handles the post request:</p>
  
  <pre><code>$args0 = array(
  'accountNumber' =&gt; $_POST['accountNumber'],
  'dateReceived' =&gt; date("Y-m-d"),
  'firstNames' =&gt; $_POST['agentName']    '
  'regNumber' =&gt; $_POST['accountNumber'],
  'surname' =&gt; $_POST['agentName']
  );
  
  try {
  $client = new SoapClient(WSDL_URL, array(
      'trace' =&gt; 1,
      'exceptions' =&gt; true,
      'connection_timeout' =&gt; 300));
  
  $params = array(
      'arg0' =&gt; $args0,
  
  );
  
  
  $client-&gt;__setLocation(WSDL_LOCATION);
  $response = $client-&gt;upload($params);
  $response = $client-&gt;__getLastResponse();
  
  echo $response;
  </code></pre>
  
  <p>Please help </p>