Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
php block unwanted symbols
Old 02-17-2009, 06:31 PM php block unwanted symbols
Extreme Talker

Posts: 176
Trades: 0
How do I make sure that a username/password only contains numbers letters and underscores?


$username
$password
Skeddles is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-17-2009, 06:52 PM Re: php block unwanted symbols
Insensus's Avatar
Ultra Talker

Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
Trades: 0
if(preg_match('/^[a-zA-Z0-9_]*$/',$username)){
// Followed the rules
}else{
// Didn't do so
}
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
Insensus is offline
Reply With Quote
View Public Profile
 
Old 02-17-2009, 07:13 PM Re: php block unwanted symbols
Extreme Talker

Posts: 176
Trades: 0
Quote:
Originally Posted by Insensus View Post
if(preg_match('/^[a-zA-Z0-9_]*$/',$username)){
// Followed the rules
}else{
// Didn't do so
}

thank you ^^
Skeddles is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php block unwanted symbols
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12125 seconds with 12 queries