0

Hello Stackoverflow engineers. I know this question might sound basic but please i will like to know this. I have a form that i want to check for spam bot attack. I knew spam bot works by filling up form fields. lets assume that I have an input field with a value and a checkbox that checked.

<input type="text" name="myname" value="nancy">
<input type="checkbox" checked="checked">

my question: can spambot be able to remove the content an input box (nancy) or uncheck the already checkedbox.

Nancy Moore
  • 2,322
  • 2
  • 21
  • 38
  • 3
    Yes, spambot can do as it pleases. You must ***always*** validate user entered information on the server-side. – Jay Blanchard Apr 25 '19 at 17:19
  • Please can you elaborate or give an instance on how spambot can just remove a value(eg. nancy) in a form input. how is that possible. I will like to know. Thanks – Nancy Moore Apr 25 '19 at 17:21
  • 1
    It's not removing anything. it's just a client that can send whatever it wants to the server. – Barmar Apr 25 '19 at 17:22
  • `document.querySelector("[name=myname]").value = "")` – Barmar Apr 25 '19 at 17:23
  • @Barmar. thanks for responding. i kown how to do validation and all data in php. front and backend. my question is assuming I have an input form with a value. can spambot remove the value in the input or uncheck the checkedbox just like the way the used to filling all the form field they see – Nancy Moore Apr 25 '19 at 17:28
  • As @Barmar stated, a spambot does not have to remove anything from a form. – Jay Blanchard Apr 25 '19 at 17:30
  • thank you. thats what i want – Nancy Moore Apr 25 '19 at 17:33

0 Answers0