query("select max(id)+1 as id from webs.product"); $obj = $res->fetch_object(); $new_id = $obj->id; ?> prepare("insert into webs.product (`name`, `description`, `price`, `category`, `image`) values (?, ?, ?, ?, ?)"); $statement->bind_param("ssdii", $name, $description, $price, $category, $image); $statement->execute(); } while (false); ?>