How to dynamically populate a dropdown

Well, here’s my best shot, although when I add another item to the dropdown, the styling gets weird. https://codepen.io/bfoley650/pen/PoZwKeb

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