I am an sending a HTTP POST request from a Google Web Toolkit app to a php script. The content-type is "application/x-www-form-urlencoded" right now so I can send variables to php and use $_POST[]
in php but I don't think I can properly send HTML markup inside one of the variables.
Here's what I have:
post_data = var1=true&var2=true$html="HTML MARKUP HERE"
When doing it this way barely any of the html comes through to php in the $_POST['html']
variable. What is the proper method to accomplish sending html markup in a POST variable. Thanks.
Percent-encode the query parameter. In JavaScript, you can use the encodeURIComponent
function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With