开发者

Informing users of incorrect form fields without Javascript [duplicate]

开发者 https://www.devze.com 2023-02-16 04:08 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Form val开发者_Go百科idation
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Form val开发者_Go百科idation

Hey all, I'm just looking for what the correct way is to inform users of incorrect form fields/empty fields, etc. Here is what I'm thinking..please let me know if its along the right track.

On the php script that receives the posted variables, do the validation (check for empty fields), and then post a flag back to the page with the form on it, letting it know which fields were empty etc. This form will be run through https and I want to keep things secure, so how should I go about this?

Thanks


You're general idea is correct. As long as through the process its kept under the https (doesn't revert back to http) you should be fine with the security part. Keep in mind though that there isn't necessarily a "correct" way of doing this. There's many MANY ways to do this and it really comes down to how you want the user interface to operate and what you have the capability of doing.

EDIT: You may find it helpful to utilize php sessions so that you don't have to pass sensitive data through the URL going back to the form.

0

精彩评论

暂无评论...
验证码 换一张
取 消