This should probably be moved to PHP and not mysql since if you are validating through AD you wont need mysql.
http://php.net/manual/en/book.ldap.phpBasically ldap is a protocol which will allow you to query your active directory database. For example, you could prompt a user for username and password and then use ldap to validate this binding in AD. You could also grab all users in a certain group or with certain fields.
http://www.php.net/manual/en/function.ldap-bind.phpThere are PHP classes available which already do this
http://adldap.sourceforge.net/I happened to write my own which is probably a lot worse, but I did so to get an understanding of what I was doing. Its been a few months since Ive messed with the code behind my authentication, but basically you connect to the AD server, then to validate a login you simply attempt to use the ldap-bind function to try and connect as that user.
Im definately no expert, as I hadnt even heard of AD until earlier this year. My company actually wants a single sign on solution where we will automatically bind the user based on windows credentials (so the intranet wouldnt even prompt a login if it they were already on the domain) I have yet to accomplish that since most apache mods for it seem to be unsupported. But I have gotten the system to prompt for credentials and validate on AD.
I would look at the class I linked to, and some tutorials on LDAP (jsut google php ldap) and using the tutorials the the php code in the class, learn how to access AD in php.
Im no where near experienced enough to give you a good breakdown of what to do, but if you have any specific questions after looking at the class or some tutorials feel free to ask.