<head>
<script> src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$('#combo').change(function(){
console.log($(this));
var sqlQuery = "SELECT product_name='combo' from product_master where mrp='textbox'";
var result = dbConn.executeCachedQuery(sqlQuery);
$.get( "abc.php");
$('#combo').change(function(){ $('#textbox').val($(this).val()); });
} ) ;
});
</script>`
</head>
<body>
<form>
<select name="combo" id="combo">
<option value="">-- Select</option>
<?php
require_once("connect.php");
$query="select * from product_master";
$result=mysql_query($query);
while ($row = mysql_fetch_array($result)) {
echo '<option value = "' . $row['product_name'] . '">' . $row['product_name'] . '</option>';
}
?>
</select>
<input type="textbox" id="textbox" value="<?php $row['mrp']; ?>" />
</form>
</body>
I want to fetch from database on selected from combo box into text box.
Same product name fetch mrp. Product name combo box and mrp text box once select combo with same mrp need to fetch.