Skip to content

Instantly share code, notes, and snippets.

@karellism
Created November 1, 2015 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karellism/8236a9069b27292529f3 to your computer and use it in GitHub Desktop.
Save karellism/8236a9069b27292529f3 to your computer and use it in GitHub Desktop.
Connect to database for simple CMS - php file
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