Ver Mensaje Individual
  #11 (permalink)  
Antiguo 17/01/2011, 08:45
Montes28
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 7 meses
Puntos: 6
Respuesta: envio de datos (6 datos )xmlhttp.open("GET","views/getuser.php?q="+str,tr

isabel estoy haciendo lo que me dices

<html>
<head>
<script type="text/javascript">
function loadXMLDoc()
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp .responseText;
}
}
xmlhttp.open("POST","demo_post.php",true);
xmlhttp.send('var1=5&var2=3');
}
</script>
</head>
<body>

y en demo_post.php

$a=$_POST["var1"];
$b=$_POST["var2"];

$suma=$a+$b;

echo $suma;