I've the following code to insert some data into my database:
$query = "INSERT INTO `questions`(`title`,`content`,`set`,`date`) VALUES(:title,:content,:set,:date)";
$stmt = $db -> prepare($query);
$stmt -> bindParam(':title',$title,PDO::PARAM_STR);
$stmt -> bindParam(':content',$content,PDO::PARAM_STR);
$stmt -> bindParam(':set',$set,PDO::PARAM_INT);
$stmt -> bindParam('date',$date,PDO::PARAM_STR);
$stmt -> execute();
echo '<script>alert("שאלה נוספה בהצלחה");</script>';
The problem is, whenever I view the inserted information in the DB, it turns to weird string such as: בעברית
I have no clue why it's happening!
P.S. If I insert English string, it's all right. It shows as a proper english in the DB. It happens when I insert data in my language.