choose selected for select option with condition [closed]

You should have only 1 select. Before the “>” of each option you can add

<?php echo ( $_POST['select1'] == 'value' ? 'selected' : '' ); ?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)