Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Bollo Omar
Added: Sep 13, 2018 5:35 PM
Views: 6
Tags: no tags
  1. <?php
  2. require_once './Connection.php';
  3. require_once './User.php';
  4.  
  5. namespace user;
  6.  
  7. use Connection;
  8. use User;
  9.  
  10. class UserController extends User {
  11.    
  12.     private $sql;
  13.     private $statement;
  14.     private $conn;
  15.    
  16.     public function __construct() {        
  17.        
  18.     }
  19.     public function edit() {
  20.         $this->conn = new \Connection();
  21.         $this->sql = "UPDATE user SET (firstname=:firstname,lastname=:lastname,username=:username)"
  22.                 . " WHERE username=:username";    
  23.         $this->statement = $this->conn->db_conn->prepare($this->sql);
  24.     }
  25.  
  26.     public function create() {              
  27.         $this->sql = "insert into User";
  28.        
  29.     }
  30.    
  31.     public function findById() {
  32.        
  33.     }
  34.     public function toString(){
  35.         return ;
  36.     }
  37. }
  38.