Hi,
I encounter a problem when trying to update data using Form, Connector, and DataProcessor.
I set up the page very similar to this tutorial docs.dhtmlx.com/doku.php?id=tuto … htmlxstart
The page update data without any problem if the ID field is an ASCII character. But, the problem occurs when the ID field is a non-ASCII character (in Thai).
The content of the connector php file is:
require_once("../codebase/connector/form_connector.php");
$res=mysql_connect($db_host,$db_user,$db_passwd);
mysql_select_db($db_name);
mysql_set_charset('utf8',$res);
$formConn = new FormConnector($res,"MySQL");
$formConn->set_encoding("utf-8");
$formConn->enable_log("formConn.log");
$formConn->render_table($sTable,$sField,$sList);
//$formConn->render_sql($sSQL,$sField,$sList);
It doesn’t matter if I use the render_table() or render_sql(). The results are the same.
I captured the POST request issued after the dpf.sendData() is invoked. The POST requests are:
- If the ID field is an ASCII character, the POST request is:
S_!nativeeditor_status: updated
S_VATrate: 0.1
S_companyName: [some data in Thai]
S_idCompany: S
S_shortName: [some data in Thai]
ids: S
S_idCompany=S&S_companyName=%E0%B8%AB%E0%B8%A3%E0%B8%A3%E0%B8%A9%E0%B8%B2%20%E0%B8%A1%E0%B8%B2%E0%B8%A3%E0%B9%8C%E0%B9%80%E0%B8%81%E0%B9%87%E0%B8%95%E0%B8%95%E0%B8%B4%E0%B9%89%E0%B8%87&S_shortName=%E0%B8%AB%E0%B8%A3%E0%B8%A3%E0%B8%A9%E0%B8%B2&S_VATrate=0.1&S_!nativeeditor_status=updated&ids=S
- If the ID field is a non-ASCII character, the POST request is:
_!nativeeditor_status: updated
_VATrate: 0.1
_companyName: [some data in Thai]
_idCompany: ห (This is the correct ID character)
_shortName: [some data in Thai]
ids: [nothing here]
_idCompany=%E0%B8%AB&_companyName=%E0%B9%84%E0%B8%AB%E0%B8%AA%E0%B8%B2&_shortName=%E0%B8%AB%E0%B8%81%E0%B8%94&_VATrate=0.1&_!nativeeditor_status=updated&ids=
I’ve spend hours digging into the dataprocessor.php and other files and changed some code. But, I don’t have any luck getting it to work. Please help.