I am using jQuery to make a POST to a PHP file with the HTML content of a div. The HTML content contain tables, inputs, smaller divs and I would like to grab the content of the main DIV and send it to the database. The only option I could think of is the POST method but I don't know if I can send plain HTML with it. Are there any other options for sending HTML content from a div to a PHP file to be inserted into MySQL ?
Thanks.
EDIT: I am now able to send full HTML data with jQuery's POST. However, my HTML characters from that DIV gets transformed into special characters. Example: ">" would become ">" and when that happens, my POST data is limited to where the first special character appears because I do my ajax POST like this:
var data = 'id='+ currid +'&html='+ div_html;
$.ajax({
type: "POST",
url: "file.php",
data: data,
.......................
.......................
Using this code is not ok because div_html contains other "&" characters so it would be considered as another POST parameter to be sent.
Any workarounds ?
Thanks again.