I’m trying to get the response from database for further usage.eg: userID
However, instead of just getting the userID as the answer,
I’m getting the response from php server with HTML
It shows every HTML tag that I had in my php file,including the comments
EDIT
The php file just simply look like this
<?php
include "Header.php";
include "main.php";
$path = $_SESSION['username'].$_POST['Case_no'];
mkdir($path);
echo $path;
?>
Everything working fine,but the output look something like (let say the $path is “1234”)
1234 口 <!--HTML comments and scripts from the webhost-->
If there is any other HTML code in the php,say a link at the front
The result shows
<a href="xxx.html">Link</a> 1234 口 <!--HTML comments and scripts-->
Anyway to get rid of this?
The required answer is just merely 1234
ADD ON
I have tried the following example in http://www.hassanpur.com/blog/2010/09/android-development-implementing-a-simple-client-server-model/ (where you can see the whole code)
Instead of getting the “Chirp chirp” as response,
I’m getting sth like “Chirp Chirp 口 ” –
send “text/plain” header to tell the client that this text shoudn’t be interpreted as HTML, because default content type is HTML