I am posting Comments in hindi to another page, where i insert to db, but the comments is getting saved as junk in mysql.
--PHP
<form method='post' action='post.php'>
<textarea name='comments'></textarea>
</form>
--post.php
$comment =$_POST["comments"];
$query = "INSERT INTO comments SET comment='".mysql_escape_string($comment)."' ";
mysql_query($query) or die(mysql_error());
In DB the text gets inserted as junk characters the database is of correct type as i have inserted the html notation on हिंदी { hindi characters to be saved} , and display works with correct META type,
but DB entry is like à╧√à╧¿à╧?à╧▌à╛?
i tried an insert query in the same file and it worked, but posting to some other file creates the problem, is it someting to do with posted data ?
i cannot use same file for insertion as other forms are there in the same page, which are handled.