ecco ho fatto questo per inviare col metodo post:
codice html:
Codice PHP:
<label>
<input name="utente" type="text" class="txtseach" id="utente" size="50" maxlength="250">
</label>
<label>
<textarea name="testo" cols="62" rows="7" class="textarearic" id="testo"></textarea>
</label>
<input name="button" type="button" class="BTseach" id="button" value="Inserisci commento" style="cursor:pointer" onClick="if(document.getElementById('utente').value!='' && document.getElementById('testo').value!='') pagexmliscomm(document.getElementById('utente').value,document.getElementById('testo').value)">
codice ajax:
Codice PHP:
function pagexmliscomm(idc,utente,testo){
myRequest = CreateXmlHttpReq(myHandler);
e = document.getElementById("commcover");
myRequest.open("POST","inc/inscomm.php");
muRequest.setRequestHeader("content-type", "application/x-www-form-urlencoded");
myRequest.send("idc="+idc+"&utente="+utente+"&testo="+testo);
}
ecco non funge come mai???