Created
November 1, 2015 02:38
-
-
Save karellism/8236a9069b27292529f3 to your computer and use it in GitHub Desktop.
Connect to database for simple CMS - php file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function connect() { | |
mysql_connect($this->host,$this->username,$this->password) or die("Could not connect. " . mysql_error()); | |
mysql_select_db($this->table) or die("Could not select database. " . mysql_error()); | |
return $this->buildDB(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment