My ajax call won't send to php file for it to show on screen. The call is running because i get the "ok" alert but the php page does not show the hello world on the screen
$.ajax({
type: "POST",
url: "test.php",
data: {data: "hello world"},
success: function(){
alert("OK");
}
});
$test = 7;
echo $test;
$data = "";
$data = $_POST["data"];
$request = $data;
print_r($request);
echo $request;
expected: 7hello world actual: 7