sorting emails by domain in php

Hi! Hope anybody can help me. I created database for emails https://code.sololearn.com/wA4a2A21a14A after that I want them to display in table- https://code.sololearn.com/wA5A00a22A14 So far it's working fine, I can sort them by name and date but I would like to filter emails by domain name for example gmail. and when there is inputed new domain like yahoo the filter option automatically apears. here is html code where to input email- https://code.sololearn.com/WA23a8A08a4a Anyone can help with code?

27th Jul 2021, 1:55 PM
Eric Kazhus
Eric Kazhus - avatar
1 Answer
You need to take all domains from the emails and add the separate to the db Select them SELECT DISTINCT edomain FROM emails
29th Jul 2021, 8:15 AM
Nico Ruder
Nico Ruder - avatar