+ 1
Which is mostly used as validators? Javascript or php?
which is easier and how to implement it ?with example in webpage
3 odpowiedzi
+ 11
By default both is used.
Server side(PHP) - to prevent hackers or wrong inputs
Client side(JS) - to help user fill up forms, so it will not lose all his data if something will be filled wrong. But it also requires 'required' keyword on input to work
+ 11
@Dev 100% use PHP(Security, you know)
And JS - for User friendly validation(
Stansart JS validation, or using AJAX)
+ 1
As Michael said, you can use both languages for validation. I personally do everything with PHP, but it's just personal choice.