Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //changelogs.php
- <?php include("loop.php"); ?>
- <?php
- $loop = new loop();
- ?>
- // loop.php
- <?php
- class db {
- /*** mysql hostname ***/
- var $hostname = 'localhost';
- /*** mysql username ***/
- var $username = 'root';
- /*** mysql password ***/
- var $password = '';
- var $connected = false;
- function dbh() {
- $dbh = new PDO("mysql:host=$this->hostname;dbname=legiontd", $this->username, $this->password);
- /*** echo a message saying we have connected ***/
- $this->connected = true;
- }
- }
- class loop {
- var $loop;
- function get_loop($query){
- $this->loop = new db();
- $this->loop->dbh();
- if ($this->loop->connected){
- echo "hi";
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment