skip to Main Content

Reactjs – Node.js receive form data sent from frontend

node.js server app.post('/create-checkout-session', (req,res) =>{ console.log(req.form); console.log(req.body); const session = await stripe.checkout.sessions.create({ line_items: [ { price: "price_id", quantity: 1, }, ], metadata: { id: 1, email: "soubhagya", }, mode: "payment", success_url: `https://www.youtube.com/?success=true`, cancel_url: `https://www.youtube.com/?canceled=true`, }); res.redirect(303, session.url); }) React frontend…

VIEW QUESTION

Mysql – I'm trying to make loginform check using knex but it doesn't work

My Code: function checkLogIn() { var emailValue = document.getElementById("emails").value; var usernameValue = document.getElementById("username").value; var passwordValue = document.getElementById("password").value; knex("users").select("id").where({ email: emailValue, username: usernameValue, password: passwordValue, }); } It should takes values from HTML and compare HTML values with MySQL DB values.…

VIEW QUESTION
Back To Top
Search