I have a jquery function that looks like this:
$('.dislike_box a').click(function(event){
event.preventDefault();
var title = $(this).data('title');
alert(title);
$.ajax({
url: 'vote.php?vote=dislike&title=title',
success: function(result){
$('.dislike_box p.vote_text').text('Dont Like it.');
}});
});
My issue is when I alert the title variable it is correct but when I pass it to the php script to be put into the database the php script uses the $_GET[] method but puts the literal string "title" into the database instead of the variable value.
Answer: Thanks to @Ivan
url: 'vote.php?vote=dislike&title='+title,