help me find out what's wrong with this code i got stuck with this error
ldap_search Search: Operations error
<?php
error_reporting(E_ALL);
ini_set('display_errors', 'On');
$ADServer = 'sample.example.net';
$loginto = 'Aboitiz';
$uname = $_POST['uname'];
$passwd = $_POST['pass'];
$ldapconn = ldap_connect($ADServer) or die("Could not connect to LDAP server.");
$ldaprdn = $loginto."\\".$uname;
$ldapbind = ldap_bind($ldapconn, $ldaprdn, $passwd);
if($ldapbind){
$find = array("cn", "givenname", "samaccountname", "homedirectory", "telephonenumber", "mail");
$base = "DC=example,DC=net";
$email = "toytoy.me@example.net";
$filter = "mail=".$email;
$result = ldap_search($ldapconn,$base,$filter,$find);
if(!$result){
die('Error - '.ldap_error($ldapconn));
}
$info = ldap_get_entries($ldapconn, $result);
print_r($info);
}else{
echo 'user dont exists';
}
ldap_close($ldapconn);
?>