Good morning,
What I want to do is that by pressing "Enter" I insert a new tag into the database.
I created my script.js file:
$(".inputTag").keypress(function(e){
if(e.which == 13) {
$.ajax({
type: 'POST',
url:"../system/libraries/InsertTag.php",
data:{
'inputTag' :$(".inputTag").val()
},
success:function(){
alert("hecho");
},
error:function(){
alert("error");
}
});
}
})
But I receive the following error:
POST http://localhost/MIAPP/system/libraries/InsertTag.php 403 (Forbidden)
Can someone tell me what I'm doing wrong and how to fix it? I guess my problem is that I do not usually use codeigniter because this without it works perfectly.