One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| class Database { | |
| public $conn; | |
| protected $hostname; | |
| protected $username; | |
| protected $password; | |
| protected $dbname; | |
| public function __construct ( $hostname, $username, $password, $dbname ) { | |
| global $conn; | |
| $this->conn = $conn; |
| <?php | |
| # Fill our vars and run on cli | |
| # $ php -f db-connect-test.php | |
| $dbname = 'name'; | |
| $dbuser = 'user'; | |
| $dbpass = 'pass'; | |
| $dbhost = 'host'; | |
| $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
| // reverse word and compare | |
| function isPalindrome1(word) { | |
| var s = ''; | |
| for (var i=word.length-1; i>=0; i--) { | |
| s += word[i]; | |
| } | |
| return s === word; | |
| } | |
| // compare from end to end (more efficient) |
| <!DOCTYPE html> | |
| <!-- | |
| Single file Tic Tac Toe against the Computer | |
| https://gist.github.com/wiseley/9458565/ | |
| Author: Matt Wiseley | |
| License: GPL - http://www.gnu.org/licenses/gpl.html | |
| --> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> |