I’m using the following code:
$.ajax({
type:'GET',
url: 'save_desc.php?scrapbook_name=<?php print(addslashes($scrapbook_name)); ?>,
success: function(data){
$("#" + id + "below").html(data);
}
});
How can I change this to sending sensitive information (with “special” characters) by posting it rather than using the $_GET method?
NOTE: I’ve tried to use addslashes but this doesn’t have any affect in passing strings with wildcard characters.
Change the
typeparameter to ‘POST’, or alternatively use jQuery’spost()function:http://api.jquery.com/jQuery.post/