you can follow this example:
http://developers.sun.com/techtopics/mobility/midp/articles/servlets/PostMidlet.java
it is using CGI script on the server side but you can easily replace the CGI script with a php
file.
you can check out these articles:
http://developers.sun.com/techtopics/mobility/allarticles/#networking
and
http://www.java-tips.org/java-me-tips/midp/how-to-use-get-and-post-methods-in-http-from-a-midlet-3.html
and more on the web...