how do i pass the selected value in my php code?

Clash Royale CLAN TAG#URR8PPPhow do i pass the selected value in my php code?
So i've a dropdown menu of my Languages, the HTML/JS output is like this:
<div class="dropdown-menu dropdown-menu-right show">
<a class="dropdown-item " ng-click="changeLang('1')">English</a>
<a class="dropdown-item " ng-click="changeLang('2')">Spanish</a>
<a class="dropdown-item active" ng-click="changeLang('3')">French</a>
the selected one in the code above is French, (class="dropdown-item active")
my PHP code in the controller is this:
<a class="nav-link dropdown-toggle text-muted waves-effect waves-dark" href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="flag-icon flag-icon-fr"></i></a>
As you can see above, whenever i change the value of the dropdown menu, the icon still pointing to French (obviously because hardcoded)
how do i catch the active one and refer to it in my PHP code ?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Before continuing, please read this
– Teemu
2 mins ago