You may try to communicate from php to java using get/post request. Communication the other way can be done by viewing xml or json response. Json is quite nice to answer and supported by php (php object may be parsed into json using json_encode()/json_decode() Java also supports json communication (see http://www.json.org/java/ ). Json allows sending null.
See more here http://www.json.org/
if all your php outputs/writes is the status of your insertion than code may look like
if(Insertion suceed){
echo "true";
}else {
echo "false:;
}
in java you need to capture the content of your Web view. i found simmilar problem and possible solution here
How do I get the web page contents from a WebView?. if it also outputs other data/web content than you just need to "hide" your status output somewhere and cut it out from output source string in java
now if you have your content in String value just use library located here:
http://code.google.com/p/json-simple/
your java code stould look like this (in my case "response" is the string with content):
String response = "false";
JSONParser parser = new JSONParser();
Boolean result = (Boolean)parser.parse(response);
i hope you understood