Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get('/insert-user',function(req,res,next){
- var context = {};
- pool.query("INSERT INTO user (`fname`, `lname`, `email`, `password`) VALUES (?,?,?,?)",
- [req.query.fname, req.query.lname, req.query.email, req.query.password],
- function(err, result){
- if(err){
- next(err);
- return;
- }
- context.results = "Inserted id " + result.insertId;
- res.render('home',context);
- });
- });
Add Comment
Please, Sign In to add comment