I am trying to send Persian string to the mysql database;but it saves the data as something like this "%D8%AC%D8%AF%DB%8C%D8%AF" .
English strings have no problem.
var new = $(this).val();
$.ajax({
url: '/url/' + new,
type: 'GET',
success: function () {
window.location.href = window.location.href;
}
});
And here is my php code.
public function url($new){
$db = Db::getInstance();
$db->insert("INSERT INTO table (column) VALUES ('$new')");}
How can I resolve this problem?
There is something wrong with my url charachters. I found out that if I use the post method, it will be resolved. I am using MVC structure and I want to have some Persian strings in my url . so how can I resolve this new problem???...