Form validation using javascript in php application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nbt725
    New Member
    • Aug 2007
    • 9

    Form validation using javascript in php application

    Dear Sir,

    Hello ! I need to validate my login form which is displayed using <div> to give sliding effect and not to refresh page, hence can't use generic php submit but to validate using javascript and/or ajax. And in log in form I need to validata user id and password to my mysql database.

    Please guide me.

    Thanks & Regards,

    Naimesh Trivedi
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Naimesh.

    JavaScript validation is not a catch-all, as the results can be spoofed. JavaScript validation is useful, as it prevents the bulk of invalid info from ever reaching your server, plus your Users get instantaneous feedback on their input. However, you should still also be doing your validation on the server for security reasons.

    To get started with JavaScript validation, check out this tutorial.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      What code do you have so far?

      See an AJAX POST example. Post your data to the PHP script which will validate the user login.

      Comment

      Working...