Replacing & in JS code on pages

I ended up doing this and it works:

var data = {
    called: 'CAP',
    captcha: $("#captcha_txt").val()
};

$.get("../form/master.php",data,function(response){
....
});

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)