Re: What am i doing wrong :\
| From: | Wendell Brown | Date: | Mon, 12 May 2003 18:58:58 +0000 |
| Subject: | Re: What am i doing wrong :\ | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147331@lists.php.net to get a copy of this message | ||
On Mon, 12 May 2003 13:25:23 EDT, Clivus2k1@aol.com wrote:
><?
>function validc($text) {
> if (preg_match("[a-zA-Z0-9_]",$text)) { return 1; }
> else { return 0; }
>}
Try this (no, I haven't checked to see if it works)....
if (preg_match("/[a-zA-Z0-9_]/",$text)) { return 1; }