I have been struggling on this simple problem for pretty long already, yes I tried to google for answer though with no luck, the problem is that my ajax request doesn't even send a thing, so I guess it has something to do with the syntax though it looks perfectly fine to me:
$(window).on('load',function()
{
$("#unfriend_user > p").click(function()
{
$.ajax(
{
url: "php_includes/remove_friend.php",
type: "POST",
data:
{
user_1 : <?php echo $logged_id ?> ,
user_2 : <?php echo $page_user_id ?>,
user_username : <?php echo $logged_username ?>,
user_password : <?php echo $logged_password ?>
},
success: function(data)
{
alert(data);
}
});
});
});
All php echoed variables have values.
The problem came up after I added these two lines:
user_username : <?php echo $logged_username ?>,
user_password : <?php echo $logged_password ?>
If I remove these two lines and "," everything works just fine.