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(); | |
} |
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
private function buildDB() { | |
$sql = <<<MySQL_QUERY | |
CREATE TABLE IF NOT EXISTS testDB ( | |
title VARCHAR(150), | |
bodytext TEXT, | |
created VARCHAR(100) | |
) | |
MySQL_QUERY; | |
return mysql_query($sql); |
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
<?php | |
class simpleCMS { | |
var $host; | |
var $username; | |
var $password; | |
var $table; | |
public function display_public() { | |
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
/* | |
* Karellism - Karel Vanhelden | |
* Problem ?? | |
*/ | |
using namespace std; | |
#include <bits/stdc++.h> | |
#define rep(i,n) for(auto i=0; i<(n); i++) |
NewerOlder