Hi,
I am trying to post string so as to pass the value from gwt to php using the
following code. Below is the code i am using in php to accept the posted
value.
Everytime I get an empty string. Am I missing something.
Please help!!!


    public void doPost(String postData) {
        RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, "
http://localhost/JSONTEST/index2.php";);

        try {
            builder.setHeader("Content-Type",
"application/x-www-form-urlencoded");
            Request response = builder.sendRequest("from gwt", new
RequestCallback() {

                public void onError(Request request, Throwable exception) {
                    // code omitted for clarity
                }

                public void onResponseReceived(Request request, Response
response) {
                    // code omitted for clarity
                    Window.alert(response.getText());
                }
            });
        } catch (RequestException e) {
            Window.alert("Failed to send the request: " + e.getMessage());
        }
    }


PHP Code
....
$input = $GLOBALS['HTTP_RAW_POST_DATA'];
if ($input == "")
    $input = "Error";
...

Thanks in advance... :)

-- 
Warm Regards,
Amit Dhingra

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to