I want fill the text-box value from the database on the basis of on change event of drop-down list in php
Actually my work flow is when i select a value by drop-down list, on the base of that selected value (on-change event) the filtered record should be in the text box using php
<head>
<script>
function SelectedTemplate()
{
what type of code i have to there?![for detail please see image i have posted][1]
</script>
</head>
<body>
<?php
$result=mysql_query("SELECT * FROM tbltemplate where UserName = '$name' " );
if($result != '')
{
while($test = mysql_fetch_array($result))
{
echo'<option value="' .$test['TempID']. '">' .$test['TempTitle']. '</option>';
}
}
?>
</body>