i am developing an inventory control system and want to authenticate users using their windows login username & password.
<?php
echo "$username<br><br>";
$ldap_server=dc.ourdomain.com;
$auth_user=$username."@".$DomainName;
if($connect=@ldap_connect($ldap_server))
{
if($bind=@ldap_bind($connect, $auth_user, $password))
{
echo "true";
@ldap_close($connect);
}
else
echo "connection failed";
}
@ldap_close($connect);
?>
i always get connection failed message. i am passing username and passwords from a form and they are passing correctly.
can some one correct me?
thanks.