[eluser]mattpointblank[/eluser]
That sort of code works for me, but in my ajax function, it works like this:
Code:
$('#sendPreview').bind('click', function(){
title = $('#title').val();
html = $('#content').val();
email = $('#email').val();
$.ajax({
type: "POST",
url: "<?php echo site_url(); ?>/newsletter/sendPreview",
data: "title="+title+"&html;="+html+"&email;="+email,
success: function(msg){
//alert('The preview email was sent!');
alert(msg);
}
});
});
Eg, my script posts to a webpage and sends data, which is when it encounters CI's $_POST filtering.