Choose a file to view:
class_News.php
class_User.php
dbBase.php
index.php
or go back to the demo
<?php ini_set('display_errors',1); ini_set('display_startup_errors',1); error_reporting(-1); include_once "dbBase.php"; ////Generic class template //// Notes: //// xx = Class Name //// xxx = table name //// $.. = column name(s) class User extends dbBase { public $fname = ""; public $lname = ""; public $phone = ""; public $email = ""; function __construct($id = "") { $this->table = "user"; if(strlen($id)>0) { Load($id); } } function Add($postData) { $ignore = array('id','add_post'); $id = parent::Add($postData,$ignore); return $id; } function Update($postData) { $ignore = array('id','update_post'); $id = parent::Update($postData,$ignore); } ////////////////////////////////////////////////// // Class Specific Functions ////////////////////////////////////////////////// } ?>