Refreshing <div> and load data from php
- by forgatn
I have on my page and there is a tag where is some and values filled from mySQL DB. I need some JavaScript I think. When I select one option, I want to display in this propriate DATAs which are in DB. without refreshing whole page.
Can you tell me how to do it, if you know that please?:)
<div id="country1" class="tabcontent">
<label>Choose protocol</label>
<SELECT name="cisloprot">
<?php
$con = mysql_connect("localhost", "root", "123456");
$sql = "SELECT kod FROM prot GROUP BY kod";
$rs = mysql_query($sql,$con);
while ($r = mysql_fetch_array($rs))
{
echo "<OPTION VALUE=".$r['kod'].">".$r['kod']."</OPTION>";
}
?>
</SELECT>
</div>