Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to insert with variables from js to mysql

//reading  post data
const useremail = req.body.useremail;
const password = req.body.password;
//save into db start
var sql = "INSERT INTO `users` (`UserName`, `UserPassword`) VALUES ('"+useremail+"','"+ password+"')";
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #insert #variables #js #mysql
ADD COMMENT
Topic
Name
2+1 =