Jump to content

Blank at random


INeedAGig

Recommended Posts

Okay, minor issue, but not sure how to resolve.  I have a form that processes through PHP and has it's fields validated with JS and sends the data to an e-mail address and a database. It works fine, but there are random times where a submitted entry will show up blank in the e-mail and not be in the database at all, any ideas on what might be causing this? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/233123-blank-at-random/
Share on other sites

Nevermind, I narrowed it down, its the Javascript validation. If it is turned off in the browser, the user can hit the submit button and bypass the validation and thus, it returns a blank form. One question though, is there any type of PHP validation anyone can recommend? That way I don't have to worry about the validation having a back door....

Link to comment
https://forums.phpfreaks.com/topic/233123-blank-at-random/#findComment-1198923
Share on other sites

Javascript is not validation. As you just saw, all anyone has to do is disable javascript, or in the case of most spambots, not use it all, and the JS 'validation' is useless. You must validate all user input server-side.

Link to comment
https://forums.phpfreaks.com/topic/233123-blank-at-random/#findComment-1198980
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.