-1

Need to write in txt file name, phone and film from inputs. I'm new in Node, so I can't do this easy task, help me please

I tried to do it using fs module, but i cant use it in client side, so idk what to do with this problem. Project using webpack, node.js

Here's html form, from which i need to take data html <form class="book-form"> <input type="text" name='name' class="padding3" placeholder="Введіть ваше ім'я"/> <input type="text" name = 'phone_number'class="padding3" placeholder="Ваш номер телефону" /> <select class = "select" name="select-films">
</select> <input href ="" type="submit" class="button"> </input> </form>

Alex Khanas
  • 335
  • 1
  • 6
  • 15

1 Answers1

0

Since fs is a node.js module, you cannot use it in your browser.

I suggest you make a express server, send a post request to it with the information and let the server write it to a database or local file.

Hobey823
  • 276
  • 4
  • 13