Use ldap_get_entries. See here:
http://www.php.net/manual/en/function.ldap-get-entries.php
Check the bottom of your code, I put something in there.
On Tuesday 17 July 2001 07:27 am, Johan Vikerskog (ECS) wrote:
> People!
>>echo "<h3>LDAP query test</h3>";
> echo "Connecting ...";
> $ds=ldap_connect("localhost"); // must be a valid LDAP server!
> echo "connect result is ".$ds."<p>";
>
> if ($ds) {
> echo "Binding ...";
> $r=ldap_bind($ds); // this is an "anonymous" bind, typically
> // read-only access
> echo "Bind result is ".$r."<p>";
>
> echo "Searching for (sn=S*) ...";
> // Search surname entry
> $sr=ldap_search($ds,"o=My Company, c=US", "sn=S*");
> echo "Search result is ".$sr."<p>";
$result = ldap_get_entries($ds, $sr);
print_r($result); // Let's just see what's in there.
Hope that helps.
Reuben D. Budiardja
> //Johan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]