0
How to store a Javascrip veriable value in mysql database? Eg let age =25; how can i store this in a specific user file in mysql
Js veriable store in mysql
2 Answers
+ 4
JavaScript codes which run from the browser, cannot store any data to the server database directly.
It needs a backend code, (can be node.js, PHP or any python codes) run from server side to further handle to database update.
The flows can be illustrated below:
JavaScript code need to send data
=> from browser via API signal
=> server script receives API signal data from API
=> backend script send connect to MySQL database
=> send data to database with MySQL query.
You need to understand web programming concept. The activities of all the web data transport actions do not happen on a single PC.
There are different machines involved, browser from PC or mobile phone which run JavaScript, and remotely a web server which run backend PHP code with database MySQL.
From multiple clients (js in PC browsers)
=> internet network
=> To single web server (running backend codes and database here)
0
Are you familiar with MySQL syntax and how to insert values into a database? /gen