Friday 31 May 2019

Can't figure out why POST is not working correctly.

This problem has me confused, because I have other POST pages working. But I am trying something new, doing a POST request within Javascript instead of just HTML form data.I am working in Node / Express, Javascript and Jquery.So first, my GET code which works fine. It pulls a column from a test PostgreSQL database, and sends it to an EJS page. In App.js I have:app.get("/test-page", function (req, res) { client.query("SELECT stockdate FROM chartdatabase;", function (error, result) { res.render("test-page", { result: result }); }); });Then I have a totally separate EJS page for POST, and it has a

No comments:

Post a Comment