Validate Form with PHP AND JavaScript?

前端 未结 4 2070
夕颜
夕颜 2021-01-07 05:13

Is it possible to validate a form with PHP and JavaScript? I\'m currently able to do both using my existing form, but only on

4条回答
  •  广开言路
    2021-01-07 05:30

    I don´t really see what the problem is, if your onsubmit action returns false in case of a non (javascript) validated form, the form simply doesn´t get submitted if javascript is enabled.

    As soon as the form gets submitted, the php can do whatever it wants, validate, return errors, etc.

提交回复
热议问题