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
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

  <ion-toolbar color="primary">


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

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

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


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


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

<ion-item lines="none">
  <ion-checkbox slot="end" (click)="buyItem(product)"></ion-checkbox>

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