maLakai

Untitled

Sep 19th, 2011
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. class imageHandle {
  2.     static $c,$m,$p;
  3.    
  4.     public function __construct()
  5.     {
  6.             self::$c = "categories";
  7.             self::$m = "mirrors";
  8.             self::$p = "pictures";
  9.            
  10.         }
  11.    
  12.     function addCategory($name) {
  13.             $name = mysql_real_escape_string($name);       
  14.             echo 'INSERT into '.self::$c.' (name) values("'.$name.'")<br />';
  15.             $sql = mysql_query('INSERT into '.self::$c.' (name) values("'.$name.'")');
  16.             if($sql) return 1; else echo mysql_error();
  17.    
  18.         }
  19.    
  20. };
Advertisement
Add Comment
Please, Sign In to add comment