How can I post data using Jquery from selected data to the PHP?
HTML code:
<select id="test" title="test" class="test">
<option value="1">1
<option value="2">2
<option value="3">3
<option value="4">4
<option value="5">5
</select>
Jquery:
$('.18').click(function(event) {
var test_s = $('#test').val();
$('.opc_mfont').load("index.php?x=18&fid=<?=$fid;?>&mid=<?=$mid;?>&data=' + test_s +'");
event.stopPropagation();
});
All the data was successfully post to PHP and MySql query except ' + test_s + ' at the and of jquery load().
I was tested that data received from select fields with "alert(test_s);" and the alert message show up with correct data on it. But I can't send "var test_s" to PHP using jquery load(). How can I do that?