Am trying to use ajax to send two form values into the GET array for processing by a PHP file in the server. I only know of passing a single argument, every time i try to pass two, the result i get in the PHP file is a concatenated string from the two parameters. The PHP query needs each parameter at different locations for processing. Here is the ajax call with explanations on what i need.
dep=document.getElementById("departure").value;
dest=document.getElementById("destination").value;
alert(dep+" "+dest);
//the line below is what needs two parameters, i try this php file is good no errors
//the only parameter i passed is q which works with the server file
xmlhttp.open("GET","schedule.php?q="+dep,true);
xmlhttp.send();
</script>
When I do this, it returns a concatenated version of the two parameters
dep=document.getElementById("departure").value;
dest=document.getElementById("destination").value;
alert(dep+" "+dest);
//the line below is my trial version of passing two parameters into the GET channel
xmlhttp.open("GET","schedule.php?q="+dep+"?m="+dest,true);
xmlhttp.send();
Please help me pass the two parameters into the GET array and access them separately in the server file.