If I have a class called Registration, should I code in the mysql_connect
inside each function inside the class that needs it, or should I make a
function called dbConnect?  If so, how can I correctly call dbConnect inside
the other functions of the class?

would it be something like this?  Or am I not thinking "OO-ishly" - add "f"
and "l" and it might be right ;)

class Registration {
    function dbConnect() {
        mysql_connect(host,usr,pwd);
    }
    function register($usr, $email, $pwd) {
        dbConnect();
        other code to handle the insertion of data
    }
}

TIA -Kirk

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

Reply via email to