How can I save form data in a custom PHP app?

Hello,

I have created a custom PHP app, and for that app, I have created a simple form with textbox and button,

when I enter some text in the textbox then click on submit button then data should be save.

but form data is not saved yet.

for data save what should I do ?in the file?

I don’t know how to do with this.

developers, please help me with this.

how can I do this?

App Development in PHP(Laravel/React JS).

below is my code.

import {gql, useQuery} from ‘@apollo/client’;
import {Banner} from ‘@shopify/polaris’;
import React from ‘react’;
import ReactDOM from ‘react-dom’;
import {Loading} from ‘@shopify/app-bridge-react’;
import app from “/css/app.css”;
import { useReducer, useState } from ‘react’;

function WhatsappSharecart() {
const [Yes, No] = useState(“No”);
const handleChange = (event) => {
No(event.target.value)
}

const [buttonlabel, setButtonlabel] = useState(“”);
const [cartmessage, setCartmessage] = useState(“”);
const handleSubmit = event => {
event.preventDefault();
alert(Button Label Is: ${buttonlabel})
alert(Cart Message on Whatsapp Share Link Is: ${cartmessage})
//console.log(“Cart Message on Whatsapp Share Link Is :-”,name);
}

const [Dafault, Left, Center, Right] = useState(“No”);

return (

Configuration

Whatsapp Share Cart Enable

Button Label Text

setButtonlabel(e.target.value)} name="wp_share_cart_label"/>

Cart Message on Whatsapp Share Link

setCartmessage(e.target.value)} />

Whatsapp Button Position on Cart Page

Save Configuration

) } export default WhatsappSharecart;

please someone help me on this.. i need help with this issue.