Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
andyd34 is on a distinguished road
 
Posts: 4
Join Date: May 2008
Default Verify form input - 05-10-2008, 07:41 PM

A simple ereg to check only alpha numeric character are entered

PHP Code:
$text "onlyalphanumericcharacters012345";

if (
ereg('[^A-Za-z0-9]'$text)) {
  echo 
"This contains characters other than letters and numbers";
}
else {
  echo 
"This contains only letters and numbers";    

Reply With Quote
(#2 (permalink))
Old
Moderator
n00b 0wna is on a distinguished road
 
Posts: 449
Join Date: Apr 2008
Location: Virginia
Send a message via MSN to n00b 0wna
Default 05-17-2008, 03:36 AM

Nice! This is very usefull
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com