Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. class User {
  2.  
  3.     function User($id) {
  4.    
  5.         $query = mysql_query("SELECT * FROM users WHERE id = '".$id."'");
  6.         $result = mysql_fetch_array($query);
  7.        
  8.         $this->id = $result['id'];
  9.         $this->name = $result['name'];
  10.         $this->level = $result['level'];
  11.         $this->health = $result['health'];
  12.         $this->money = $result['money'];
  13.         $this->level = $result['level'];
  14.         $this->xp = $result['xp'];
  15.        
  16.         $this->maxxp = $result['maxxp'];
  17.         $this->maxhealth = $result['health'];
  18.        
  19.     }
  20.    
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement