(Replaced back-ticks with [code]...[/code]
tags ~ MOD)
I have depended dropdown but this error occur
<select id="alphaid" name="alphaid" onchange="getalpha(this.value)">
<option>Select Alphabit</option>
<?php
mysqli_query($conn, "Select * from verbs");
$alphabits = range('A', 'Z');
foreach($alphabits as $alphabit)
{
?>
<option value="<?php echo $alphabit; ?>"><?php echo $alphabit; ?> </option>
<?php } ?> </select> </div></div>
<select class="form-control" name="verbid" id="verbid" onChange="getverb(this.value)">
<option>------- Select Verb --------</option>
</select>
===============================
<script>
$(document).ready(function(){
});
function getalpha(alphaid)
{
$.post("get_verb.php", { alphaid:alphaid }, function(data){
$("#verbid").html(data);
});
}
function getverb(verbid)
{
$.post("get_verb.php", { verbid:verbid }, function(data){
});
}
</script>
=========================
Get_verb.php
if (isset($_POST['alphaid'])){
$alphaid = $_POST['alphaid'];
$query = mysqli_query($conn, "Select * from verb_translation where start_with = ".$alphaid." order by eng_translation");
if(mysqli_num_rows($query) > 0)
{
echo '<option value="">------- Select verbs -------</option>';
while($row = mysqli_fetch_assoc($query))
{
echo '<option value="'.$row->fkverbid.'">'.$row->eng_translation.'</option>';
}
} else {
echo '<option value="">No Record</option>';
}
}