you can do either:
ereg:
if(isset($field) and !$field!='') { // first check if it was submitted at
all,
// you'll get errors if it isn't there
$res = False;
$field = trim($field); // trim it to remove any whitespaces
Jamie Saunders wrote:
>
> ...
>
> 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.
>
> ...
>
Try this:
Hope this helps.
--
Pavel a.k.a. Papi
--
PHP General Mailing List (http://www.php.net/)
To un
2 matches
Mail list logo