Advertisement
Guest User

Untitled

a guest
Jul 9th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. <?php
  2. class User
  3. {
  4.     $id = null;
  5.     $username = null;
  6.     $gues = true;
  7.     //vs.. vs..
  8.    
  9.     __consturct($id= false)
  10.     {
  11.         if($id)
  12.         {
  13.                //sql query ile user bilgilerini cek,
  14.             $this->username = $sqlResult['username'];
  15.             $this->password = //vs vs..
  16.             vs.. vs..
  17.         }
  18.         else if(session dan user id bilgisini al)
  19.         {
  20.             yukardaki ayni islemler.
  21.         }
  22.         else
  23.         {
  24.                      $this->id = 0;
  25.                  $this->guest = true;
  26.         }
  27.         return $this;
  28.     }
  29.    
  30.     function getUserByUserName($username)
  31.     {
  32.         //sql query ile user bilgilerini cek,
  33.             $this->username = $sqlResult['username'];
  34.             $this->password = //vs vs..
  35.             return $this;
  36.     }
  37.    
  38.     function updateUser()
  39.     {
  40.       //update query butun fieldlar bu classin degiskenleri.
  41.     }
  42.    
  43.     //sonra hangi fonksiyona ihtiyac duyuyosan yaz buraya,
  44.    
  45. }
  46.  
  47.  
  48.  
  49. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement