Now in the Expense tables _form.php ,if i select the expense_name from the dropdownlist then the corresponding expense_code must be displayed as a non-editable field and must go into the Expense table.
The dependent drop-down list question was posted as a separate topic by me. In this topic i just wanted to display a value in the database depending on the selected value of the drop-down list .
As you said in this topic there is just one drop-down list . Now depending on the expense-name that i select the corresponding expense-code must be shown to the user as a non editable text-field and must be entered into the database.
I was trying to use Eager Loading for this issue. I saw code which looks like this