How to post HTML form data in NodeJs backend | NodeJs | ExpressJs
ฝัง
- เผยแพร่เมื่อ 5 ก.ย. 2024
- This video requires pre knowledge of Basics of Backend in NodeJs and Express Js.
I will also upload "how to save login data to a database in future" 😊😊🙂😙
For absolute beginners I will upload a new playlist of Basics of HTML and CSS. So if you want to learn it then please subscribe.
Also this channel is quite new so please share with your friends who are likely to learn web development.
NodeJs, ExpressJs,Html,Css,Javascript
thank you so much for this video! The only thing that could help other like me that got confused about the POST endpoint is: the ACTION in the HTML FORM has to be set as the same of the first argument in app.post, that is "/formPost" in this case. Please tell if I'm wrong
Yes, you should put the same argument in the POST method in html that is in app.post that is "/formPost"
@@becoder153 where in the html show we put the "/formPost" ?
awesome tutorial you explained some concepts that none of major it tech youtubers explains
And now, how can I send my form to my MySql Db?
I need form submitted values print in a new html file not just send
Great tutorial forever.. thanks you solved my problem ❤️❤️
You're welcome!
Very good tutorial. Clear descriptions and easy to fallow. Would love to hear you in your new ones though ;) Thx for submiting this, it helped me to solve my problem!
hi thank you for this tutorial, i would really appreciate if you can provide me a link to the source code, am a beginner whose a bit confuse with, thank you
I am trying to access form data using GET method. Can anyone tell me what is the error in the below code:
import express from "express";
const app=express()
const port = process.env.PORT || '4000'
app.use(express.urlencoded({
extended: false
}));
app.use(express.json());
app.get('/', (req, res) => {
res.send('Home Page');
})
app.get('/form', (req, res) => {
// res.setHeader('content-type', 'application/x-www-form-urlencoded');
res.write('Student Registration Form')
res.write('Student Registration Form')
res.write('')
res.write(' ')
res.write(' ')
res.write('')
res.write('')
res.send();
})
app.get('/handleForm', (req, res) => {
console.log(req.query)
res.send('Form Submitted')
})
app.listen(port, () => {
console.log(`Server listening at localhost:${port}`)
})
thanks, great tutorial
You can add some sound too
Yeah it will be added within some time
thank you soo much i've been looking everywhere for something like this. however, in my html im href'ing some js code but it is not showing on the website. plz help
im trying to put this inside my react app, and i forgot to say that im trying to use the three library in my script which is where it is telling the problem is
Much respect and gratitude for the video..thank you👏👏👏🙌🙌
Yeah
When I enter the username and password, visual studio does not appear.
can you share the code because you missed some places too quickly
Login form how to do
you are a genious! I've been trying to see the error I had in my code for days and you solved it for me in minutes, thanks!
Amazing tutorial! Really useful and quick explanation! Can I ask you a question? How would you recommend me to save this data? Thank you so much for the video
In a database, mysql will work or mongodb
This music should be mainstream again
Ohhh
ohh to you
is there source code?
Thank you so much!
Cannot POST /form ?
it didn't sow me the data entered as vector 9:16
Mine says cannot post
Great tutorial. Gets straight to the point and easy to follow along! Only thing I would like to see in future videos is a voiceover :)
Thanks for your tutorial
but can you explain me why my script doesnt take effect on the html file
Pls update to git
it doesn't work indian !
show*
this has to be one of the worst youtube tutorials, big props for that!
bkl kya tha ye