[jQuery] GET MULTIPLE VALUE FROM jQuery for external file loader

[jQuery] GET MULTIPLE VALUE FROM jQuery for external file loader


Hi!
I use jQuery Loader Content to auto complete the state select tag.
function loadContentKabupatenKotaDiploma(id) {
    $("#contenPanKabupatenKotaDiploma").hide();
    $("#contenPanKabupatenKotaDiploma").load("../dre-includes/
url_pendidikan/findKabupatenKota.php?id="+id+"", '',
callbackKabupatenKotaDiploma);
}
function callbackKabupatenKotaDiploma() {
    $("#contenPanKabupatenKotaDiploma").show();
}
$(document).ready(loadContentKabupatenKotaDiploma(id));
then here are the html code:
<label>Propinsi</label>
<?
$query="SELECT * FROM master_propinsi";
$result=mysql_query($query);
?>
<select class="input" name="id_propinsi_pendidikan[]"
onChange="loadContentKabupatenKotaDiploma(this.value)">
    <option value="">Pilih Propinsi</option>
    <?
    while($rows = mysql_fetch_array($result))
    {
    ?>
    <option value="<? echo $rows['id']; ?>"><? echo $rows
['nama_propinsi']; ?></option>
    <?
    }
    ?>
</select>
<div class="spacer">&nbsp;</div>
<div id="contenPanKabupatenKotaDiploma">&nbsp;</div>
I create a script for external file: findKabupatenKota.php
<label>Kabupaten/Kota</label>
<select class="input" id="id_kabupaten_kota_pendidikan"
name="id_kabupaten_kota_pendidikan[]">
<option>Pilih Kabupaten/Kota</option>
<? while($row=mysql_fetch_array($result)) { ?>
<option value=<? echo $row['id']; ?>><? echo $row
['nama_kabupaten_kota']; ?></option>
<? } ?>
</select>
AND now I want to get the value of id_kabupaten_kota_pendidikan[].
I try this way for POST FORM Action:
for($d=0;$d <= count($_POST['nama_pt']);$d++)
        {
        $jQueryKabKPendidikan[$d] = "<script>$
('[@name=id_kabupaten_kota_pendidikan]')[$d].val(); </script>";
        if(!empty($_POST['nama_pt'][$d]))
        {
        mysql_query("INSERT INTO `data_pendidikan_terakhir` (
        `id_peserta` ,
        `id_jenjang` ,
        `tahun_lulus` ,
        `id_jurusan` ,
        `nama_pt` ,
        `id_propinsi` ,
        `id_kabupaten_kota` ,
        `tanggal_input`
        )
        VALUES (
        '".$noUrut."',
        '".clearString($_POST['id_jenjang'][$d])."',
        '0000',
        '".clearString($_POST['id_jurusan'][$d])."',
        '".clearString($_POST['nama_pt'][$d])."',
        '".clearString($_POST['id_propinsi_pendidikan'][$d])."',
        '".clearString($jQueryKabKPendidikan[$d])."',
        '".thisTime."')");
        }
        }
The result is $jQueryKabKPendidikan[$d] = 0;
Well... do you have one idea to get multiple value from a selected
field ? and is combination of jQuery + PHP a better way ??? Or I must
use a complete Ajax Post Action without PHP ?
Regard