I wanted to send a data to a php page via ajax, without html code (example below)
$.ajax({
url: "connection.php",
type: "post",
data: {
table: "test_sending_data"
},
success: function (data) {
console.log("data sended with success);
}
});
connection.php
<?php
$table= $_POST['table'];
echo "Value: ". $table;
?>