微信用户提交的数据写入access
微信用户提交信息后如“zp”,服务器通过公共平台返回数据给用户关于“zp”的相关信息,我用的是access 该怎么样把用户的数据(fromname createtime等)写入access,下面是我写的一条sql,但写不进去,不知道问题出在哪,求指教。
if (!empty($postStr)){
//解析数据
$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);
$fromUsername = $postObj->FromUserName;
$toUsername = $postObj->ToUserName;
$usertime=$postObj->CreateTime;
$keyword = trim($postObj->Content);
//将用户的关键字转化为GBK格式,以对数据库操作
$keyword =mb_convert_encoding($keyword,"GBK","UTF-8");
//将用户的数据保存到数据库
$name=mb_convert_encoding($fromUsername,"GBK","UTF-8");
$dd=odbc_exec($conn,"insert into KS_UserWrite (UserName) values ('.$name.')");//将fromname写入表中