Rifts Posted October 12, 2010 Share Posted October 12, 2010 hey everyone, on my site I have a form, is there any reason I should use php validation vs javascript validation ? thanks Quote Link to comment https://forums.phpfreaks.com/topic/215734-php-vs-javascript-validation/ Share on other sites More sharing options...
PFMaBiSmAd Posted October 12, 2010 Share Posted October 12, 2010 You MUST always validate external data once it reaches the server, so, you MUST use php validation. You CAN validate data using javascript before it is actually submitted, but this is only a convenience to your visitors that are actually using a browser to request your form and have javascript enabled. It does nothing for visitors that have javascript disabled or bot scripts that submit data directly to your form processing code and could care less if you have any javascript validation logic for your form. Quote Link to comment https://forums.phpfreaks.com/topic/215734-php-vs-javascript-validation/#findComment-1121603 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.