The standing of the female students for their female teachers or the male students for their male teachers is an act that should not be done. At the very least, it is strongly disliked. This is based on Anas’ statement, “No one was more beloved to them – the Companions – than the Messenger of Allah (peace be upon him). And they would not stand for him when he came to them, as they knew that he disliked such an act.” The Prophet (peace be upon him) has also said,
“Whoever loves to have men stand for him shall take his abode in the Fire” 
On this matter, the ruling concerning men in the same as that concerning women. May Allah guide us all to what is pleasing to Him and keep us from everything that angers Him and is prohibited. May Allah bestow on all of us beneficial knowledge, as well as acting accordingly, He is the Generous, the Noble.
Shaikh ibn Baz
 Recorded by Ahmad, Abu Dawud and al-Tirmidzi, Al-Albani states that it is shahih. Al-Albani, Sahih al-Jami al-Sagheer, vol. 2, p. 1033