Php coding help - Newbie question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux