Skip to main content

Posts

Showing posts with the label characters

codeigniter non latin characters ajax call

I have a textarea and a button where i send the text via ajax to the database to post it. However when i post non-latin characters... it wont get them and it returns blank... if the text is in latin characters it works fine... my js code $.ajax({ type: "POST", url: www+"controller/postText", dataType: 'json', data: { input : input.val(), }, success: function(data) { return data; } }); my php code public function postText(){ $input = isset($_POST["input"]) ? trim($_POST["input"]) : ""; echo $input; return false; }