On 1/23/07, Chris <dmagick@xxxxxxxxx> wrote:
> Sorry for troubling all again. > I am trying to use the Pear DB_ldap for the above scripts. > > Does any one have any sample code for ldap_connect () ldap_search etc. http://php.net/ldap_connect http://php.net/ldap_search Both pages have examples. If you have a specific problem then post it. -- Postgresql & php tutorials http://www.designmagick.com/
Thanx for replying Chris. I am in process to modify my existing php scripts to a more neater/compact code. In current scripts certain code ( ldap_connect , ldap_bind , if connet error show error page etc ) is repeated many times. This makes the scripts very bulky and even small changes that need to be done are very difficult to implement. That's why I am looking for some thing with a ready functions for the above which I can use. I believe PEAR DB_ldap has it. But very little documentation is avaliable. So I was searching for any sample scripts. ----- My current script: user edit page <?php require 'validate.php' // included on every page to check logged in user. bind to ldap else error.. show a form to user to edit user details. post to update script. disconnect ldap. ?> on update <?php validate user bind to ldap else ..... check if any changes need to be done to the user .( compare before & after values in the POST variables ) create the array for modfiy do ldap_modify in case error shout , else tell all is ok. ldap_disconnect. ?> The problem is, for separate edit pages I have written separate update pages. Any new object to edit needs a new edit page & a relevent update page. I believe if I can use functions this can be reduced to just one update page with fewer edit pages. Very sorry for this long mail. Thanx & Regards Ram -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php