Esempio n. 1
0
 public function insert()
 {
     if ($_SERVER['REQUEST_METHOD'] != 'POST') {
         echo '0';
         return;
     }
     $name = remove_slashes($_POST['name']);
     $brandDAO = new BrandDAO(DataSource::getInstance());
     $last_id = $brandDAO->insert($name);
     echo $last_id;
 }