Currently, I have:
$("#upvote").click(function(){
var up = parseInt(document.getElementById('voteScore').innerHTML);
up++;
document.getElementById('voteScore').innerHTML = up;
$.ajax("include/mysql_lib.php?op=upvote&v1=<?php echo $id; ?>");
});
There are two problems I have this with. First, I'm using GET to send variables, which makes me nervous. Secondly, the mysql_lib.php
script is right there in my web root. I would much prefer having it in my hosting provider's protected
directory instead of public
.
Is this possible?