Php coding help - Newbie question

From: Date: Wed, 17 Jan 2007 12:22:04 +0000
Subject: Php coding help - Newbie question
Groups: php.general 
Request: Send a blank email to php-general+get-247211@lists.php.net to get a copy of this message
Hi Group, A very newbie question. Might be discussed earlier, please forgive. I am having a site in PHP ( not very great design ) which I need to convert/modify to use functions. Such the code for connecting / binding to Ldap is not repeated & scripts are more readable. The site deals with modifying / adding / deleting entries in a LDAP dir. In each of the pages following is done: <?php require 'validate.php' ;// validate.php checks if the user is loged in $connect = ldap_connect(ldapserver); if ($connect) { bind ... do the things.... }else { echo erro..} ?> Also please advice what is a correct method of checking the user's session. Currenlty I use a "HTTP_SESSION_VARS" variable to store the user's login & passwd . Each time the user hits the page these vars are checked with the existing values in the LDAP (this is done by validate.php). Please suggest me some good starting point where I can start a fresh with more compact/cleaner Code. Many thanx in advance. Regards Ram

« previous php.general (#247211) next »