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 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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

16th May 2022, 12:24 PM
Syal Khan
Syal Khan - avatar
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)
16th May 2022, 12:57 PM
Calviղ
Calviղ - avatar
0
Are you familiar with MySQL syntax and how to insert values into a database? /gen
16th May 2022, 12:38 PM
Justice
Justice - avatar