Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/83758-solved-quick-validation-question/
Share on other sites

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.