hidden_within Posted December 25, 2008 Report Share Posted December 25, 2008 i want a login form and I want the first and last name fields to be numeric only. how do I do that? I also would like to know how to allow the password field to only contain strings and numbers not other characters. How would you validate email addresses in a form to make sure that they are written in a correct format? Quote Link to comment Share on other sites More sharing options...
falkencreative Posted December 26, 2008 Report Share Posted December 26, 2008 You'd want to do this either client side via Javascript, or server side via PHP. Javascript will be less work intensive on the server, but it could be disabled by the end user. I'd suggest doing anything non-essential via Javascript, and anything essential via PHP. Email addresses can be validated by using a PHP regular expression... do a web search for "email validation regular expression", and you'll come up with a lot of options. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.