Question: how to display selected value of dropdownlist in textbox using ajax?
Answer: ajax({ type: "POST", url: "test. php", data:\'id=\'+val, success: function(data){ $("#price-list"). html(data); } }); } </script> </head> <body> '; $sql = "SELECT * FROM forms"; $result = $conn->query($sql); echo "<select class='form-control select2' id='product1' name='product1' onChange='getprice(this.