Advertisement
pmbijker

class.php

Jun 13th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.55 KB | None | 0 0
  1. <?php
  2. class Person {
  3.     private $firstname;
  4.     private $lastname;
  5.     private $email;
  6.     private $password;
  7.    
  8.     public function __construct() {
  9.     }
  10.    
  11.     public function getName() {
  12.     }
  13.    
  14.     public function registerPerson($fn, $ln, $em, $pw) {
  15.     }
  16.    
  17.     public function loginPerson($em, $pw) {
  18.     }
  19.    
  20.     public function changeLastName($cln) {
  21.     }
  22. }
  23.  
  24. class mysqli_database {
  25.     private $_link;
  26.    
  27.     public function connect($server='localhost', $username='root', $password='geheim', $database = 'systeem_db') {
  28.         $this->_link = mysqli_connect($server, $username, $password, $database);
  29.     }
  30.     public function error() {
  31.         return mysqli_error($this->_link);
  32.     }
  33.     public function errno() {
  34.         return mysqli_errno($this->_link);  
  35.     }
  36.     public function escape($string) {
  37.         return mysqli_real_escape_string($this->_link, $string);  
  38.     }
  39.     public function query($query) {
  40.         return mysqli_query($this->_link, $query);  
  41.     }
  42.     public function fetchArray($result, $array_type = MYSQL_BOTH) {
  43.         return mysqli_fetch_array($result, $array_type);  
  44.     }
  45.     public function fetchRow($result) {
  46.         return mysqli_fetch_row($result);  
  47.     }
  48.     public function fetchAssoc($result) {
  49.         return mysqli_fetch_assoc($result);
  50.     }
  51.     public function fetchObject($result) {
  52.         return mysqli_fetch_object($result);  
  53.     }
  54.     public function numRows($result) {
  55.         return mysqli_num_rows($result);
  56.     }
  57.     public function close() {
  58.         return mysqli_close($this->_link);
  59.     }
  60. }
  61. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement