# Updating database collection by OnClick function from a button

**URL:** <https://forum.wixstudio.com/t/updating-database-collection-by-onclick-function-from-a-button/21639>\
**Category:** Ask the community\
**Tags:** code\
**Created:** [August 28, 2019, 3:31pm UTC](https://forum.wixstudio.com/t/updating-database-collection-by-onclick-function-from-a-button/21639 "2019-08-28T15:31:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadrayousefi10](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/sadrayousefi10/32/14225_2.png) [@sadrayousefi10](https://forum.wixstudio.com/u/sadrayousefi10)\
**Post date:** [August 28, 2019, 3:31pm UTC](https://forum.wixstudio.com/t/updating-database-collection-by-onclick-function-from-a-button/21639/1 "2019-08-28T15:31:02Z")

</div>

Hi,  
I am creating a Sport league table that allows the users to see their team’s performance via a table that is connected to a database. They also can add/subtract their numbers. I have designed it in a way that they can just do it by clicking a button. I put 6 buttons in the page that allows them to submit their data to the database. I was wondering if anybody could write me this specific code.

![](https://us1.discourse-cdn.com/wix/original/3X/8/5/85c16cba2a88c30238222c576b6dcab74aa18d76.png)
