Advertisement
Guest User

Untitled

a guest
Oct 13th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. var hash = results[0].password;
  2.  
  3. var hash = results.password;
  4.  
  5. router.post('/', function(req, res, next) {
  6. var username = req.body.username;
  7. var password = req.body.password;
  8.  
  9. db.query('SELECT * FROM user WHERE username = ?', [username], function (error, results, fields) {
  10. if (error) throw error;
  11. var hash = results[0].password;
  12. console.log(hash);
  13. });
  14.  
  15. res.redirect('/');
  16.  
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement