How to insert checkbox values using php to mysql

I created an expandable list with checkbox, and wish to save the value of the checked box in mysql using php. I am totally new with php and mysql so I’m clueless what to do next.

This is the expandable list
image
I stored the parent and children list in information.json

{
    "items": [
        {
            "name": "Color",
            "children": [
                { "name": "Black" },
                { "name": "White" },
                { "name": "Yellow" }
            ]
        },
       {
            "name": "Size",
            "children": [
                { "name": "Large" },
                { "name": "Small" }
            ]
        },
        {
            "name": "Shape",
            "children": [
                { "name": "Circle" },
                { "name": "Square" }
            ]
        },
        {
            "name": "Coupons",
            "children": []
        }
    ]
}

The parent list (Color, Size, Shape, Coupons) was included in home.page.html

<ion-header>
  <ion-toolbar color="primary">
    <ion-title>
      List
    </ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>

<ion-list *ngFor="let item of information; let i = index;" class="accordion-list" lines="full">
  <ion-item tappable (click)="toggleSection(i)" [ngClass]="{'section-active': item.open, 'section-inactive': !item.open}">
    <ion-icon slot="end" name="arrow-forward" *ngIf="!item.open"></ion-icon>
    <ion-icon slot="end" name="arrow-down" *ngIf="item.open"></ion-icon>
    <ion-label class="label">
      {{item.name}}
    </ion-label>
  </ion-item>

  <div *ngIf="item.children && item.open">

    <app-product *ngFor="let child of item.children" [product]="child"></app-product>

  </div>

  <p *ngIf="item.children.length == 0 && item.open" text-center>Sorry, nothing in here!</p>
</ion-list>

</ion-content>

the tag selector is to perform the expandable list from the new created component, product.component.html

<ion-item lines="none">
  <ion-label>{{product.name}}</ion-label>
  <ion-checkbox slot="end" (click)="buyItem(product)"></ion-checkbox>
</ion-item>

Can anyone guide me what to do next to enable the checked values store in mysql ?

First, PHP & mySQL does not run in the native app. This confusion happens all the time. You will need to listen to the responses from the app then make the web service call to your API (PHP code) that lives on some server.

Thank you for answering, but may I know what did you mean by need to listen to the responses from the app ? And I understood well about the API from your explaining.

When the ngModel changes or whatever action you want to listen for to save the data, like a Save button, is what I was referring to.

Understood. Do you know how to make php code handle the checkbox values and then convert them to the appropriate insert statements in mysql table, by any chance? Plus the value is from the information.json file
I tried to look for tutorial but can’t find one