I’m trying to make my links SEO friendly by addingdate and title. However, I some of the titles are in Arabic. The English ones work great, while the Arabic ones doesn’t. Example:
خالد-على-20120923220529.html
Following this tutorial, I’ve produced this code:
$title=mysql_real_escape_string($_POST['title']);
i have error with insert title and URL didn’t insert with Arabic character
and when removing this code inserting done no problem but when select this url from database will redirect not found 404
i need t display my links
How can i resolve this problem?
Note
$conn = mysql_connect($db_host,$db_user,$db_pass) or die(mysql_error());
mysql_select_db($db_name,$conn);
mysql_query("SET NAMES 'utf8'");
mysql_query('SET CHARACTER SET utf8');
Meta Tags
<meta charset="UTF-8" />
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
You should fix 3 problems :
1. Edit your code on
Article.phpto:2. Make sure your
urlfield collation isutf_general_ci3. Edit your
.htaccessfile to: