Instantly share code, notes, and snippets.

View Person.php
<?php
/**
* Created by PhpStorm.
* User: mchraiet
* Date: 16/02/17
* Time: 2:52 PM
*/
class Person
{
View class.database.php
<?php
/*
* Mysql database class - only one connection alowed
*/
class Database {
private $_connection;
private static $_instance; //The single instance
private $_host = "HOSTt";
private $_username = "USERNAME";
private $_password = "PASSWORd";
View gist:2597326

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})