So I have created a POST route in Express.js and I am trying to create a signup page. I am able to get the form data using req.body but I am unable to send the data to mysql database. I already have functions in the database but I am not sure how to send the data there. Can someone help me here? This is my POST route that I have:
router.post('/register', function(req, res) {
var firstName = req.body.firstName;
var lastName = req.body.lastName;
var email = req.body.email;
var confirmEmail = req.body.confirmEmail;
var password = req.body.password;
var confirmPassword = req.body.confirmPassword; });
Aucun commentaire:
Enregistrer un commentaire