Currently, I'm developing a Blockchain Dapp using Visual Studio Code. This system will register the user's details such as first name, last name and origin country. Here is the code snippet:
(index.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="jquery.js"></script>
<script src="registration.js"></script>
</head>
<body>
<form name="registration">
<div class="input-group">
<label>First name</label>
<input type="text" id="fName" placeholder="First Name" value="" required>
</div>
<div class="input-group">
<label>Last name</label>
<input type="text" id="lName" placeholder="Last Name" value="" required>
</div>
<div class="input-group">
<label>Country of Origin</label>
<input type="text" id="originCountry" placeholder="Country of Origin" value="" required>
</div>
<input type="submit" hidden="">
<div class="input-group"> <button type="submit" class="btn" id="btnRegister" value="Submit"
onClick="App.setRefugee()" style="cursor:pointer;">Register</button> </div>
</form>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="./js/web3.min.js"></script>
<script src="./js/truffle-contract.js"></script>
<script src="app.js"></script>
</body>
</html>
When the smart contract has been deployed, and the user has entered the details of the first name, last name and origin country, the user's details will be stored in the Blockchain(Ganache). But, besides storing the user's details inside the Blockchain, I'm also trying to store the detail of the origin country of the user inside PHPMyAdmin using PHP and MySQL, as I want to extract the data from MYSQL and display the statistic. May I know how am I suppose to do this? As I am using Xampp for the PHP and MYSQL, but I didn't manage to keep in the PHPMyAdmin. I have also read about XDebug, but can this solve this problem? Thank you very much.