Snatch Posted December 30, 2007 Share Posted December 30, 2007 Hi! I was just wondering, is it possible to use both JavaScript and PHP validation on a form? I.e JavaScript checks the form in the page, then when it is ok it's sent to the server and checked again via PHP. If it is possible would this really be practical or necessary? Quote Link to comment https://forums.phpfreaks.com/topic/83758-solved-quick-validation-question/ Share on other sites More sharing options...
cooldude832 Posted December 30, 2007 Share Posted December 30, 2007 its redundant, but can keep your users from getting agrovated. PHP validation should always be present as JS can be disabled and you could get dangerous results. The JS can help the user from having to reload the page, but for php purposes it has no impact you will be doing a php verification always. Quote Link to comment https://forums.phpfreaks.com/topic/83758-solved-quick-validation-question/#findComment-426165 Share on other sites More sharing options...
GingerRobot Posted December 30, 2007 Share Posted December 30, 2007 Its not necessary - server side validation is. However, it is practical and user friendly. From a user point of view, its much nicer to be told immediately that there is some error in the form, rather than having to wait for the form to be submitted and the page to reload. Quote Link to comment https://forums.phpfreaks.com/topic/83758-solved-quick-validation-question/#findComment-426170 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.