Here is the thing you wanted to do
Here i am just sending the value to another and just retuning the same to the parent file.
index.php (that is in the front)
<script src="http://code.jquery.com/jquery-1.7.2.js"></script>
<form role="form" method="post">
<select name="inputStore" onchange="getval(this);">
<option value="1">1</option>
<option value="2">2</option>
</select>
</form>
<div id='result'>
</div>
<script type="text/javascript">
function getval(sel) {
var datas =sel.value;
console.log(datas);
$.ajax({
type: "POST",
url : "response.php",
data: {
'selected': datas,
},
success : function(data)
{
console.log(data);
$("#result").html(data);
}
},"json");
}
</script>
response.php That will process your request
<?php
$value = $_POST['selected'];
echo 'This is sent from server '.$value.' - End';
?>
Update :
(As the questioner wants to see output for 2 inputs at same time )
Here is the Front File :
<script src="http://code.jquery.com/jquery-1.7.2.js"></script>
<form role="form" method="post">
<select name="inputStore" id="inputStore" >
<option value="stud">Male Hottie</option>
<option value="babe">Female Hottie</option>
</select>
<select name="inputStoretwo" id="inputStoretwo">
<option value="20037336">Artizans</option>
<option value="20080134">Bwabies!</option>
<option value="20097365">Crave Mart</option>
<option value="20099998">David & Goliath</option>
<option value="20098166">Domo</option>
<option value="20101926">Emily the Strange</option>
<option value="20098167">Garfield</option>
<option value="26">Jetsetter</option>
<option value="3">Like Dat</option>
<option value="21">Paris Hilton</option>
<option value="19">Rocawear</option>
<option value="10">ShoeBuy</option>
<option value="20100198">Skelanimals</option>
<option value="20096121">SW&TH</option>
<option value="1">The Castle</option>
<option value="4">The Lair</option>
<option value="923">The Mix</option>
<option value="20098121">The Powerpuff Girls</option>
<option value="5">The Surf Shop</option>
<option value="20076231">Tie The Knot</option>
<option value="20099224">Tokidoki</option>
<option value="2">University Club</option>
<option value="6">Z Avenue</option>
<option value="20099506">Z's Greetings</option>
<option value="20">Snoop Dog</option>
</select>
</form>
<button>Pass the value</button>
<div id='result'>
</div>
<script type="text/javascript">
$("button").click(function(){
var first = $("#inputStore option:selected").text();
var second = $("#inputStoretwo option:selected").text();
$.ajax({
type: "POST",
url : "response.php",
data: {
'firstvalue': first,
'secondvalue': second,
},
success : function(data)
{
console.log(data);
$("#result").html(data);
}
},"json");
});
</script>
and here is the response file :
<?php
$first = $_POST['firstvalue'];
$second = $_POST['secondvalue'];
echo 'This is first value : '.$first.'<br> and this is the second value : '.$second;
?>