Hi,
Thank you for your best script and help.
I found from different sites and I have tried more then 10 unserialize() and serialize() functions.
It gives me different errors in each time.
Could you please help me about this problem.
This is my test page about this problem:
azersayt.com/ajaxeditinplac/php.php
For example if you try any English word, it is okay. But in case of other languages, I have problem.
Ex: əğş
Output: %u0259%u011F%u015F
Here are my source:
edit.php:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
if ($_POST['id'] == 'desc' ) {
//$fp = fopen('text.txt', 'w') or die("Failed to open file for writing.");
include "configat.inc";
$_POST[content] = htmlspecialchars(stripslashes($_POST[content]));
// WRITE TO DATABASE
$queryToWriteToDatabase = ("UPDATE blog SET title = '".$_POST['content']."' WHERE Id='63'");
mysql_query($queryToWriteToDatabase);
$content = $_POST['content'];
echo "$content";
}
?>
=======================
php.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link href="editinplace.css" rel="Stylesheet" type="text/css" />
<script src="prototype.js" type="text/javascript"></script>
<script src="editinplace.js" type="text/javascript"></script>
</head>
<body>
<?php
include "configat.inc";
// READ FROM DATABASE
$queryToReadFromDatabase = ("SELECT * from blog where Id='63'");
$result = mysql_query($queryToReadFromDatabase);
while ($row = mysql_fetch_array($result))
{
//echo $row['title'];
$codeToBeEdited = $row['title'];
$idName1 = 'desc';
require_once('AjaxEditInPlace.inc.php');
$ajaxEditInPlace = new AjaxEditInPlace($codeToBeEdited, $row['title']);
echo $ajaxEditInPlace->getEditInPlaceCode($idName1);
}
?>
</body>
</html>
=============