var message = document.location.href;
$(function(){
var message = document.location.href;
$.post('/index.php', {message: message});
});
$_POST['message'];
<?php
echo $_POST['message'];
?>
$(function(){
var message = document.location.href;
$.post('/url.php', {message: message}, function(data){
alert(data);
});
});
$.ajax({
url: "/file.php",
type: "POST",
data: {message: message}
}).done(function(data) {
console.log(data);
})
var message = document.location.href;
$.ajax({
url: "index.php",
type: "POST",
data: {message: message}
}).done(function(data) {
console.log(data);
})