Jump to content

User Validation PHP + JavaScript


victordeassis

Recommended Posts

Hi guys!

 

I've been working on a login form and I have some problems to validate the input data, I need to consist if the login and password fields aren't with spaces or no allowed characters, for this I've been used JavaScript for client-side validation, but if the fields are Ok, I need to call my php function to see if the user and pass are on mySQL database. I don't know how to "call" the php after the JavaScript validation. If someone could help me I will be thankful.

 

 

Link to comment
Share on other sites

Javascript inapproriate for validation because a user can turnoff their JS.

 

<?php

some code

?>

 

is how you "call" php.

 

Sounds like you should complete the php tutorials:

 

http://www.w3schools.com/php/default.asp

Edited by niche
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...