So I need to pass long string variable from JavaScript to PHP, but the URL shows me that its too long. I use this method:
function Fillup(id){
var answer = $('.nicEdit-main').html();
$.get('submit.php?id='+id+'&answer='+answer,
function(data){
$('.answer-div').html(data);
});
};
And grab them at the PHP file:
$id = $_GET['id'];
$answer = $_GET['answer'];
But there are times that answer variable are long html codes. For example I created textarea with text editor options, witch you can see is .nicEdit-main and if there is picture added, then my variable is too long to be passed trough URL. Can someone please suggest me a better method?
$.postas suggested and all should be fine