What is LDAP and how does it relate to PHP? If you're unsure, then Dannie's come to save the day! In this article he explains what LDAP is and shows you how to create an LDAP address book with PHP...
//Assign Result Set to an Array $result_array = ldap_get_entries($connect_id, $search_id); } else { //Echo Connection Error echo "Could not connect to LDAP server: $LDAP_SERVER[$SERVER_ID]"; }
//Make Form echo "<CENTER><FORM ACTION=\"$PHP_SELF\" METHOD=\"GET\">"; echo "Search in:<SELECT NAME=\"SERVER_ID\">";
//Loop Through and Create SELECT OPTIONs for($i=0; $i<count($LDAP_NAME); $i++) echo "<OPTION VALUE=\"$i\">".$LDAP_NAME[$i]."</OPTION>";
echo "</SELECT><BR>"; echo "Search for:<INPUT TYPE=\"text\" NAME=\"common\">"; echo "<INPUT TYPE=\"submit\" NAME=\"lookup\" VALUE=\"go\"><BR>"; echo "(You can use * for wildcard searches, ex. * Stanley will find all Stanleys)<BR>"; echo "</FORM></CENTER>";