I'm storing an array and sending this via ajax...
var heart = [31,32,33,34,35,36,37,38,39,42,43];
// Sending this data via ajax to php file/
$.ajax({
type: "POST",
data:{ 'system': heart },
url: "login-function.php",
success: function(msg){
alert('yes');
}
});
I believe its sending correctly because i'm getting a alert saying yes. This is my php file:
$system = $_POST['system'];
echo $system;
Am I storing this into a variable right ? How can i echo this value onto the page?