This code i downloaded from this site. It’s working perfectly. But i need dropdown should display data from Mysql and it should retain the selected value after submitting in php.
Thank in Advance…
Can we assume this code is within form tags with method=“post”, a submit input and being run in a php environment? You are setting $nature with POST and so to convert this it using value from the DB you will need to UPDATE or INSERT post data to your DB table then query for this record and set the variable with the DB result.
Here If I select dropdown value then i click submit validateOrder() is working correctly. But the problem is dropdown value not retain selected value, it showing “SELECT”. I need to retain the selected values…