Salve a tutti,
ho un problema: faccio una richiesta Ajax con POST dove invio una stringa ( un file xml ) a un file php che non mi deve restituire nulla.
Come faccio a ricevere la stringa inviata dal file PHP???
Cioè: cosa devo scrivere dentro il file php ????
Richiesta Ajax
codice:
function senderInfo(){
if( window.ActiveXObject ){
// IE
try { sender = new ActiveXObject("Msxml2.XMLHTTP");}
catch (e) {
try {sender = new ActiveXObject("Microsoft.XMLHTTP");}
catch (e) { alert("Errore: " + e); }
}
}
else if( window.XMLHttpRequest ){sender = new XMLHttpRequest();}
}
function senderStatus(){
if(sender.readyState == 4){}
}
function sendInfo(name, infoXML){
sender = null;
senderInfo();
sender.open("POST", "DB/" + name + "_info.php" );
sender.onreadystatechange = senderStatus;
sender.send(infoXML);
//response.setHeader("Cache-Control", "no-cache");
//response.setHeader("Pragma", "no-cache");
}
Spero che il codice non risulti complicato!