开发者

Quick AJAX / JSON security question

开发者 https://www.devze.com 2023-03-13 09:39 出处:网络
In a form I have I want to be able to check whether the i开发者_开发知识库ntended email address or username is unique as part of the validation process

In a form I have I want to be able to check whether the i开发者_开发知识库ntended email address or username is unique as part of the validation process

I have created a JSON file with PHP from database data to work with JavaScript validation but the problem is that anybody can see the JSON file

Is there a way around this and still be able to use this method?


In short, no.

Why don't you just create an ajax function that takes in the email address and returns a boolean indicating whether it's unique by querying the database? JQuery has great AJAX capabilities: http://api.jquery.com/category/ajax/

0

精彩评论

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