I have button like this.
<input onclick="reply_click(this.id,this.name)" target="_blank" type="submit" id="'+clickid+'" name="'+click_ip+'" value="Check">
And javascript like this.
function reply_click(clicked_id,click_ip)
{
    var data        = 'sendCID=' + clicked_id;
    alert(data);
    $.ajax({
                type: 'POST',
                url: 'send_data.php',
                data: data, 
                async:false,
                success: function(){
                success = true
                }
            });
    if(success){
      window.open('http://whatismyipaddress.com/ip/'+click_ip)
    }
}
In Alert working correctly, but data not send to database. How to fix this?
Thank you...
 
    