Is there anything wrong with just using a SQL query in an ajax call? For example something like:
$.ajax({
type: "POST",
url: "queryhandler.php",
data: { query: "INSERT INTO users VALUES(incontrol, drowssap)" },
dataType: "json",
success: function (data) {
if (typeof callback == 'function')
callback(data);
}
);
Is this unadviced? If it is, why?
DELETE FROM usersin the console.