I need help..Even after doing extensive research and youtube videos.. I can't seem to get this. This is just for a hypothetical situational based project i'm doing to demonstrate the functionality of storing fake credit card info in a mySQL database from a PHP file. The goal is: Once a user inputs their "credit card info" they hit "remember card" and after they hit submit button, their info gets saved in the database i created but i can't figure out how to connect them...
payment.php
<div class="wrapper">
<div class="payment">
<div class="payment-logo">
<p>P</p>
</div>
<h2>Payment Gateway</h2>
<div class="form">
<div class="card space icon-relative">
<label class="label">Card holder:</label>
<input type="text" class="input" placeholder="Coding Market">
<i class="fas fa-user"></i>
</div>
<div class="card space icon-relative">
<label class="label">Card number:</label>
<input type="text" class="input" data-mask="0000 0000 0000 0000" placeholder="Card Number">
<i class="far fa-credit-card"></i>
</div>
<div class="card-grp space">
<div class="card-item icon-relative">
<label class="label">Expiry date:</label>
<input type="text" name="expiry-data" class="input" placeholder="00 / 00">
<i class="far fa-calendar-alt"></i>
</div>
<div class="card-item icon-relative">
<label class="label">CVC:</label>
<input type="text" class="input" data-mask="000" placeholder="000">
<i class="fas fa-lock"></i>
</div>
</div>
<div class="btn">
Pay
</div>
<!-- Checkbox for storing credit card info -->
<label class="container">Yes, I would like my credit card information stored for future purchase.
<input type="checkbox" checked="checked">
<span class="checkmark"></span>
</label>
</div>
<style>
database
CREATE TABLE Patient_Payment
(
Pat_ID int PRIMARY KEY,
Patient_Last varchar(15),
Patient_First varchar(15),
Patient_MiddleInt varchar(1),
Patient_Bal float(8),
Patient_PaymentType varchar(15),
Patient_PaymentNumbers varchar(19),
Patient_PaymentExpiration varchar(5)
FOREIGN KEY (Pat_ID) REFERENCES Patient_info(Patient_ID)
);
INSERT INTO Patient_Payment VALUES(12345,'Ramas','Bob','A','0','VISA', '9678-4567-0987-3245','09/22');
INSERT INTO Patient_Payment VALUES(12346,'Caster','Leona','K','50.25','MASTERCARD','8930-2803-0289-9284','03/23');
INSERT INTO Patient_Payment VALUES(12347,'Smith','Kathy','W','345.86','VISA','8300-9379-2000-2259','02/24');
INSERT INTO Patient_Payment VALUES(12348,'Miher','Paul','F','536.75','AMERICANEXPESS','2777-038920-11190','01/22');
INSERT INTO Patient_Payment VALUES(12349,'Orlando','Myron','','0','DISCOVER','9990-3459-2018-0009','02/22');
INSERT INTO Patient_Payment VALUES(12350,'O''Brian','Amy','B','0','VISA','2803-3399-0294-1212','09/22');
INSERT INTO Patient_Payment VALUES(12351,'Brown','James','G','221.19','AMERICANEXPRESS','2777-456783-25690','06/22');
INSERT INTO Patient_Payment VALUES(12352,'Williams','George','','768.93','PAYPAL','3983-8974-9200-9129','04/23');
INSERT INTO Patient_Payment VALUES(12353,'Baxter','Julie','A','216.55','DISCOVER','7820-9932-6699-0021','03/22');
INSERT INTO Patient_Payment VALUES(12354,'Smith','Olette','K','0','VISA','8430-0192-9222-0021','09/23');