O have page with some javascript code and I sending data from textarea to php file save.php to save data on server
code:
var data = 'data='+document.getElementById("data").value;
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange=function(){
if (xmlhttp.readyState==4 && xmlhttp.status==200){
response.innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("POST","save.php",true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send(data);
send data is okey but if I echo data in php on save.php it's broken %ad -> �
save.php code:
$post_data = $_POST['data'];
echo $post_data;
textarea contains:
somethink like:
%packages --excludedocs
@^minimal
@core
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
with %addon is problem becouse it changed to �don com_redhat_kdump.....