For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > December 2005 > Classes and Includes









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Classes and Includes
Craig Hoffman

2005-12-13, 6:57 pm

Hi There,
Question: How do I include a file or another class, such as a
database connection (table, username, password, etc...) into a
class? I don't want to to change the username and password on every
class(file) that I upload to the server? I'm just picking up this OO
stuff, I'm sort of a newbee. ;) Any help would be appreciated.

For example:

<?php
class SomeClass {

var someVarable;

public function SomeFunction {
//run some query from the MySQL...

}

}
?>

Thanks,
Craig
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com