Hello! There were several problems when sending a cross-domain request. They are resolved. And in anticipation of the expected result, a new one - the POST array came empty. I ask the public for help. My code

function sendData() { $.ajax({ url: 'https://some_domen.com/my_file.php', type: "POST", data: { 'exchange_id': exchange_id, 'description': description, 'source_link': wl, 'job_title': job_title, 'budget': budget, }, success: function (data) { alert(data); }, error: function () { alert('Error!'); } }); } 

On the server code:

 print_r($_POST); exit; 

The answer comes

 array ( ) 
  • Look at the request parameters, for example, through the chrome developer tools. - ilyaplot

1 answer 1

curl did not process the $ _POST request

  • Something from your "Answer" is not clear. Could you explain in more detail? - Pavel Mayorov
  • It is not the answer to the question. To leave your comments or ask the author to clarify, leave a comment to the appropriate post. - From the queue of checks - Denis
  • @Denis this answer and wrote the TS. And apparently this is still the answer to his question - Vasily Barbashev