[eluser]Razican[/eluser]
Hello, I have a code in JQuery to do a $.post but I can't get the post information in my controller. When I set overall XSS to TRUE, it does 5 "XSS filtering completed" and it stops there, and when I set it to FALSE, it stops after loading the input class. Here is my JQuery code:
Code:
$(function(){
$('input').bind('blur keyup', function()
{
$('#form_result').html(loading);
var name = $(this).attr('name'),
value = $(this).val();
$.post("can't put links", { name: value }, function(data) {
alert(data);
});
});
});
Obviously I don't receive the alert.
Here is my controller:
Code:
public function request()
{
if ($this->input->is_ajax_request())
{
$this->lang->load('registration');
$this->load->model('registration_m');
$name = $this->input->post('name');
log_message('debug', 'Name: "'.$name.'"');
switch ($name)
{
case 'username':
echo 'OK';
break;
default:
}
}
else
{
log_message('error', 'User with IP '.$this->input->ip_address().' has tried to enter without doing an AJAX request.');
redirect('registration');
}
}
}
If you need more information, please, let me know.