Aloha everyone out there! I've been searching around for hours, trying all different kind of $.ajax setups and all that.
But all i can get is an "Undefined index" error. At the moment, im using this while trying to pass the var from my script.js, to conInfo.php
$.ajax({
url: 'conInfo.php',
type: 'POST',
data: {'data': 1},
success: function (data) {
console.log(data);
}
});
And inside of my conInfo.php
<?php
$value = $_POST['data'];
echo $value;
?>
And this site is required within my index.php, with the connected script.js Thanks partypeople.