Hello
I want to change <select> values samiler to other select value
for example
I choise honda from <select id=”car”> got new values in <select id=”model”> 1) civic 2) accord 3) … etc
and these models in database
here my code
[code=html]
<head>
<script
src=”//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”>
</script>
<script type=”text/javascript”>
$(document).ready(function() {
$(“#make”).change(function() {
var val = $(this).val();
<?php
$result = mysqli_query($americacon,”SELECT * FROM cars WHERE make = val”);
while($row = mysqli_fetch_array($result)) {
?>
$(“#model”).html(“<option value='<?php echo $row[‘model’]; ?>’><?php echo $row[‘model’]; ?></option>”);
<?php
}
?>
});
</script>
</head>
<body>
<select id=”make”>
<option value=”honda”>honda</option>
<option value=”golf”>Golf</option>
</select>
<select id=”model”>
<option></option
</select>
</body>
sorry for my english