Write to PDF using PHP from android device
<p>I am trying to write to a pdf file on php server. I have sent variables to the server, create the pdf document, then have my phone download the document to view on device. The variables seem not to write on the php file. I have my code below</p>

<pre><code> public void postData() {
    try {
    Calculate calc = new Calculate();

    HttpClient mClient = new DefaultHttpClient();

    StringBuilder sb=new StringBuilder("myurl.com/pdf.php");

    HttpPost mpost = new HttpPost(sb.toString());

            String value = "1234";

    List nameValuepairs = new ArrayList(1);

    nameValuepairs.add(new BasicNameValuePair("id",value));



    mpost.setEntity(new UrlEncodedFormEntity(nameValuepairs));


    } catch (UnsupportedEncodingException e) {
    Log.w(" error ", e.toString());
    } catch (Exception e) {
    Log.w(" error ", e.toString());
    }
}
</code></pre>

<p>And my php code to write the variable "value" onto the pdf document:</p>

<pre><code>//code to reverse the string
if($_POST[] != null) {
$reversed = strrev($_POST["value"]);

$this-&gt;SetFont('Arial','u',50);

$this-&gt;Text(52,68,$reversed);

}
</code></pre>

<p>I am just trying to write the variable in a random spot, but the if statement is always null and I do not know why. Thanks. Sorry if it is a little sloppy.</p>
