10 Tips That Every PHP Newbie Should Knowasses and more.
http://www.phpbuilder.com/columns/vaska20050722.php3
10 Tips That Every PHP Newbie Should Know
I wish I had known these 10 tips the day I started working with PHP. Instead of learning them through painstaking process, I could have been on my way to becoming a PHP programmer even sooner! This article is presented in two parts and is intended for folks who are new to PHP.
Tip 1: MySQL Connection Class
The majority of web applications I've worked with over the past year have used some variation of this connection class:
class DB {
    function DB() {
        $this->host = "localhost"; // your host
        $this->db = "myDatabase"; // your database
        $this->user = "root"; // your username
        $this->pass = "mysql"; // your password
        $this->link = mysql_connect($this->host, $this->user,  
$this->pass);
        mysql_select_db($this->db);
    }
}
.......lire l'original ici
 
No comments:
Post a Comment