Refreshing <div> and load data from php

Posted by forgatn on Stack Overflow See other posts from Stack Overflow or by forgatn
Published on 2012-11-13T16:50:13Z Indexed on 2012/11/13 17:00 UTC
Read the original article Hit count: 194

Filed under:
|
|
|

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>

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript