How to send data to HTML page and how to use AJAX for Single Page Application in NodeJS Server using express.js framework?
How can I display the form submitted data in another HTML Page From 1st page (page1.html)collecting the data from users and after appending this data in the database I want to show the submitted values in another page i.e.(page4.html) Below is my code I have tried using res.sendFile or res.send server.post('/addname', (req, res) => { const user = { timestamp: new Date, FName: req.body.FName, LName: req.body.LName, Phone: req.body.Phone, Email: req.body.email, Contact: req.body.business, Business: req.body.contact, OTP: req.body.otp_field } res.sendFile(__dirname + '/page4.html'); //along with