By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,816 Members | 1,332 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,816 IT Pros & Developers. It's quick & easy.

Form validation using javascript in php application

P: 9
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
Aug 22 '07 #1
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 5,821
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.
Aug 22 '07 #2

Expert Mod 15k+
P: 16,027
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.
Aug 22 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.