I was trying to post a simple variable to a php page from construct using AJAX post to url method. Here's my PHP code
<?php
header('Access-Control-Allow-Origin: *');
if (isset($_POST["X"])) {
$x = $_POST["X"];
echo $x;
}else{
echo 'no variable received';
}
?>[/code:2qhjjjzl]
Here's a screenshot of my C2 code
[img="https://www.dropbox.com/s/0y587d24t4zwztr/Screenshot%202017-10-22%2000.37.53.png?dl=0"]
Can somebody tell me what am I doing wrong here? And also its pretty straightforward in Jquery AJAX and in Construct 2 what to do with that data field is not very clear. What does it mean "The data to post, in query string form"?
Thank you in advance for taking a look at it.