I have problem about showing query result
I have table where there are atributes. The atributes are type, trait, and tariff.
In html, I have 2 select option which fetch with type and trait, and then I have textbox tariff which is empty.
HTML:
<select class="custom-select" id="type" name="type">
<option value="">Pilih Tipe Barang</option>
<option value="Tipe 1">Tipe 1</option>
<option value="Tipe 2">Tipe 2</option>
</select>
<select class="custom-select" id="trait" name="trait">
<option value="">Pilih Sifat Barang</option>
<option value="Sifat 1">Sifat 1</option>
<option value="Sifat 2">Sifat 2</option>
</select>
<input class="form-control" type="text" id="tariff" name="tariff" placeholder="Tarif Bea Penjual">
What I want is when I select type option and trait option, javascript change the value of textbox tariff from the table that I have made it.
I think it's need querying in tag <script> (" SELECT tariff WHERE type = 'type value' AND trait = 'trait value' ")
.
But I don't know how to make that.
Please help and thank you very much.