안녕하세요 안드로이드 초보개발자입니다..
php로 db구축햇구요
<? include "../../../gbid/gbidindex.php"; ?>
<?
if(!$db) echo "Error01";
else{
$strText = json_decode(stripslashes($_REQUEST['params']));
$board_content = $strText->board_content;
$board_imgpath = $strText->board_imgpath;
$board_type = $strText->board_type;
$membership_idx = $strText->membership_idx;
$sql = "INSERT INTO dog_board ( `board_idx` , `board_content` , `board_imgpath`, `board_date`,`board_type`,`membership_idx`) ".
"VALUES ( null , '$board_content' , '$board_imgpath', now(),'$board_type','$membership_idx')";
$rs = mysql_query($sql,$conn);
if($rs) {
echo "diaryinsert";
}else{
echo "fail";
}
mysql_close($conn);
}
?>
이런식으로 db구축햇습니다. 그리고 db에 값은 한글로 잘 저장되구요
echo "diaryinsert"도 안드로이드 이클립스 log로 찍어보면 잘나옵니다.............
그런데!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("params", params.toString()));
// httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs,"UTF-8"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs,HTTP.UTF_8));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
if(entity != null){
String res = EntityUtils.toString(entity,HTTP.UTF_8);
Log.d("--", "res = " + res);
if(res.equals("diaryinsert")){
Log.d("--", "in");
}
// Message msg = mhandler.obtainMessage();
// msg.obj = res;
// mhandler.sendMessage(msg);
}
저기.. if(res.equlas("diaryinsert") 보이시나요................
저길로 들어가질않아요 ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ
미치겟어요 ㅠㅠ 그위에 log.d("--",res); 여긴 잘찍히거든요..
근데 왜 if문안으로 안들어가는걸까요.. ㅠㅠㅠㅠㅠㅠㅠㅠㅠ
정말미치겟네여 ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ도와주세요 제발 고수님..ㅜ.ㅜ.ㅜ.ㅜ.ㅜ

로그뺏을경우!!

그냥 찍엇을경우!!!!!!!