simple form validation
| From: | Jamie Saunders | Date: | Fri, 27 Apr 2001 14:38:56 +0000 |
| Subject: | simple form validation | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-50463@lists.php.net to get a copy of this message | ||
Hi,
First of all, I've just joined this list, so here's a brief introduction. My name's Jamie Saunders, I'm an 18 year old student from the UK studying for my A-Levels. I'm currently working on a Computer Studies project for a local business which involves setting up several databases on the web. After reading Webmonkey.com's excellent introduction to PHP I've decided to use it in conjunction with MySQL for the project. Later this year, if all goes well I'm hoping to take a 3 years BA Honors course in Multimedia Web Production.
Right, you still with me? What I'd like to know is how to validate a text field in an HTML form to make sure it only contains numbers. I know how to check it so it only contains letters, but not numbers - the field I want to check is for phone numbers - so it can't contain any special characters either. I expect this is very simple but I can't seem to get it working properly. Any help appreciated.
Cheers,
Jamie Saunders