Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.