Question: how to keep selected value in dropdown after submit in php?
Answer: selected=”selected” is required with-in a particular option tag to remain it selected with-in the drop-down list. $selected = “”; if( $_POST[ 'bookCode' ] == $book_row[ 'bookCode' ] ) { $selected = “selected”; }