note 55160 added to function.is-numeric
| From: | strohel at hotmail dot com | Date: | Tue, 26 Jul 2005 19:39:01 +0000 |
| Subject: | note 55160 added to function.is-numeric | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92507@lists.php.net to get a copy of this message | ||
ishmaelmakitla at yahoo dot com:
Simplier would be if you used regular expressions - it would look like this:
<?php
if(!ereg("^[\. a-zA-Z]{1,}$", $name)) die("Error: Name contains unallowed
chars");
?>
See http://mirrors.inway.cz/manual/en/ref.regex.php
Good REGEX reference: http://www.regular-expressions.info/reference.html
Good luck.
----
Manual Page -- http://www.php.net/manual/en/function.is-numeric.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55160
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55160&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55160&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55160&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55160&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55160&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55160&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55160&report=yes
Search -- http://master.php.net/manage/user-notes.php