Insert Array To Database With Angular JS

I getting problem to insert array with php to database, php code:

$name = mysql_real_escape_string($data->name);
$address = mysql_real_escape_string($data->address);
$school = mysql_real_escape_string($data->school);
$year = mysql_real_escape_string($data->year);

$qry = 'INSERT INTO users (name,address,school,year) values ("' . $name . '","' . $address . '","' . $school . '","' . $year . '")';

angular js code:

$http({
    method : 'POST',
    url    : 'post.php',
    data   : {
              name   : $scope.name,
              address: $scope.address,
              users  : $scope.users
    }
})

how to explanation php code and combine with angular js? Anybody have idea? for more details here is preview


Click here view more answers http://ift.tt/1PUkVhs