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

ความคิดเห็น • 39

  • @mataih1
    @mataih1 2 ปีที่แล้ว +7

    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

    • @becoder153
      @becoder153  2 ปีที่แล้ว +1

      Yes, you should put the same argument in the POST method in html that is in app.post that is "/formPost"

    • @MatthsK
      @MatthsK ปีที่แล้ว

      @@becoder153 where in the html show we put the "/formPost" ?

  • @thedrew6905
    @thedrew6905 ปีที่แล้ว

    awesome tutorial you explained some concepts that none of major it tech youtubers explains

  • @bruhlickd
    @bruhlickd 2 ปีที่แล้ว +4

    And now, how can I send my form to my MySql Db?

  • @rnjack5427
    @rnjack5427 2 ปีที่แล้ว +3

    I need form submitted values print in a new html file not just send

  • @fun_vtech9532
    @fun_vtech9532 6 หลายเดือนก่อน

    Great tutorial forever.. thanks you solved my problem ❤️❤️

    • @becoder153
      @becoder153  2 หลายเดือนก่อน

      You're welcome!

  • @MaxSharpy
    @MaxSharpy 11 หลายเดือนก่อน

    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!

  • @nehlzintoonz1432
    @nehlzintoonz1432 ปีที่แล้ว +1

    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

  • @amartyajaiswal4093
    @amartyajaiswal4093 ปีที่แล้ว +1

    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}`)
    })

  • @PedroAlves-rx6so
    @PedroAlves-rx6so ปีที่แล้ว

    thanks, great tutorial

  • @ironsky9982
    @ironsky9982 3 ปีที่แล้ว +4

    You can add some sound too

    • @virendranath4569
      @virendranath4569 3 ปีที่แล้ว +3

      Yeah it will be added within some time

  • @Faisal-jo5vk
    @Faisal-jo5vk 2 ปีที่แล้ว +1

    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

    • @Faisal-jo5vk
      @Faisal-jo5vk 2 ปีที่แล้ว

      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

  • @hez3472
    @hez3472 2 ปีที่แล้ว +1

    Much respect and gratitude for the video..thank you👏👏👏🙌🙌

  • @ironsky9982
    @ironsky9982 3 ปีที่แล้ว +3

    Yeah

  • @aeminkolbasar
    @aeminkolbasar 2 ปีที่แล้ว +1

    When I enter the username and password, visual studio does not appear.

    • @aeminkolbasar
      @aeminkolbasar 2 ปีที่แล้ว

      can you share the code because you missed some places too quickly

  • @samjosephbritto8854
    @samjosephbritto8854 2 หลายเดือนก่อน

    Login form how to do

  • @mauriciogabriel6746
    @mauriciogabriel6746 2 ปีที่แล้ว +1

    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!

  • @matheusdamiao7902
    @matheusdamiao7902 2 ปีที่แล้ว +3

    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

    • @iknowright9533
      @iknowright9533 ปีที่แล้ว

      In a database, mysql will work or mongodb

  • @emmanuelrojasmusica
    @emmanuelrojasmusica ปีที่แล้ว +2

    This music should be mainstream again

  • @iamironsky02
    @iamironsky02 3 ปีที่แล้ว +3

    Ohhh

  • @joabutt
    @joabutt 2 ปีที่แล้ว +4

    is there source code?

  • @shirohige69140
    @shirohige69140 ปีที่แล้ว

    Thank you so much!

  • @Ümitcan_Uygun06
    @Ümitcan_Uygun06 5 หลายเดือนก่อน

    Cannot POST /form ?

  • @hassanbechara2861
    @hassanbechara2861 2 ปีที่แล้ว

    it didn't sow me the data entered as vector 9:16

  • @user-dv1ke4rz5b
    @user-dv1ke4rz5b 8 หลายเดือนก่อน

    Mine says cannot post

  • @xv3lito378
    @xv3lito378 2 ปีที่แล้ว

    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 :)

  • @hoangnguyenduy8984
    @hoangnguyenduy8984 2 ปีที่แล้ว

    Thanks for your tutorial
    but can you explain me why my script doesnt take effect on the html file

  • @adarshvasu9195
    @adarshvasu9195 ปีที่แล้ว

    Pls update to git

  • @exe.m1dn1ght
    @exe.m1dn1ght ปีที่แล้ว +1

    it doesn't work indian !

  • @hassanbechara2861
    @hassanbechara2861 2 ปีที่แล้ว

    show*

  • @BrawlStars-jd7jh
    @BrawlStars-jd7jh ปีที่แล้ว

    this has to be one of the worst youtube tutorials, big props for that!

  • @3x10.8_ms
    @3x10.8_ms ปีที่แล้ว

    bkl kya tha ye